python-awips/dynamicserialize/adapters/DatabaseIDAdapter.py

28 lines
658 B
Python
Raw Normal View History

2015-06-18 10:25:33 -06:00
##
##
#
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID
2016-03-16 16:32:17 -05:00
#
#
2015-06-18 10:25:33 -06:00
# SOFTWARE HISTORY
2016-03-16 16:32:17 -05:00
#
2015-06-18 10:25:33 -06:00
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 03/29/11 dgilling Initial Creation.
2016-03-16 16:32:17 -05:00
#
#
2015-06-18 10:25:33 -06:00
#
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import DatabaseID
ClassAdapter = 'com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID'
def serialize(context, dbId):
context.writeString(str(dbId))
2016-03-16 16:32:17 -05:00
2015-06-18 10:25:33 -06:00
def deserialize(context):
2016-03-16 16:32:17 -05:00
result = DatabaseID(context.readString())
return result