python-awips/dynamicserialize/adapters/DatabaseIDAdapter.py

27 lines
657 B
Python
Raw Normal View History

2018-09-05 15:52:38 -06:00
##
##
#
# Adapter for com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 03/29/11 dgilling Initial Creation.
#
#
#
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))
def deserialize(context):
result = DatabaseID(context.readString())
return result