com.intersys.classes
Class SerialObject
java.lang.Object
com.intersys.classes.CacheGeneric
com.intersys.classes.CacheRootObject
com.intersys.classes.RegisteredObject
com.intersys.classes.SerialObject
- All Implemented Interfaces:
- ObjectHandle, Serializable
- Direct Known Subclasses:
- SerialStream, com.intersys.classes.SysAbstractArray, com.intersys.classes.SysAbstractList
- public class SerialObject
- extends RegisteredObject
- implements Serializable
- See Also:
- Serialized Form
Methods inherited from class com.intersys.classes.RegisteredObject |
_className, _className, _constructClone, _constructClone, _constructClone, _isA, _isModified, _normalizeObject, _packageName, _validateObject, _validateObject, constructClone, constructClone, getZRef |
Methods inherited from class com.intersys.classes.CacheRootObject |
_close, castTo, equals, getDatabase, getField, getOref, getProxy, getString, hashCode, release, releaseInternal, toString |
SerialObject
public SerialObject(com.intersys.cache.CacheObject ref)
throws CacheException
SerialObject
public SerialObject(Database db)
throws CacheException
_open
public static RegisteredObject _open(Database db,
Oid oid)
throws CacheException
- Throws:
CacheException
openOnServer
public static RegisteredObject openOnServer(Database db,
Oid oid)
throws CacheException
- Throws:
CacheException
getCacheClassName
public static String getCacheClassName()
getCacheClass
public CacheClass getCacheClass()
throws CacheException
- Overrides:
getCacheClass
in class RegisteredObject
- Throws:
CacheException
checkAllFieldsValid
public static void checkAllFieldsValid(Database db)
throws CacheException
- Throws:
CacheException
checkAllMethods
public static void checkAllMethods(Database db)
throws CacheException
- Throws:
CacheException
_getSwizzleObject
public void _getSwizzleObject()
throws CacheException
- Throws:
CacheException
_getSwizzleObject
public void _getSwizzleObject(Integer force)
throws CacheException
- Throws:
CacheException
_getSwizzleObject
public void _getSwizzleObject(Integer force,
OidHolder oid)
throws CacheException
- Throws:
CacheException
_logicalToOdbc
public static String _logicalToOdbc(Database db)
throws CacheException
- Throws:
CacheException
_logicalToOdbc
public static String _logicalToOdbc(Database db,
String _val)
throws CacheException
- Throws:
CacheException
_odbcToLogical
public static String _odbcToLogical(Database db)
throws CacheException
- Throws:
CacheException
_odbcToLogical
public static String _odbcToLogical(Database db,
String _val)
throws CacheException
- Throws:
CacheException
getOid
public Oid getOid()
throws CacheException
- Throws:
CacheException
serialize
public Object serialize()
throws CacheException
- Creates a serial state of a serial object. This state can be
used by any other client working with the same Cache
database. It also can be used inside COS methods on the server.
The result can be used in setObject()
method to
set a stored procedure argument. It also can be converted to
verbose representation using toString() method.
The returned object can be operated on using class
com.intersys.jdbc.SysListProxy
.
- Returns:
- Serial state of the object in an internal format.
- Throws:
CacheException
- See Also:
SysListProxy
,
CallableStatement.setObject(java.lang.String,java.lang.Object)
,
serialize(byte[],int[])
serialize
public byte[] serialize(byte[] where,
int[] len)
throws CacheException
- Creates a serial state of a serial object. This state can be
used by any other client working with the same Cache
database. It also can be used inside COS methods on the server.
The result can be used to construct object identity for this
serial object by calling corresponding constructor for
com.intersys.objects.Oid
.
The best attempt is made to write serial state in the byte array,
supplied as first
parameter. If it is null or its length is insufficient to hold
the serial state and in some other cases when it is impossible to use it
a new array is allocated. In any case the
actual array holding serial state is returned.
If the second parameter len
is given as non-null
and not a zero length array then the first element of this
array will contain a number of actual bytes in a serial
state. In other words, the serial state will occupy first
len[0]
bytes in a returned array.
If the second parameter is either null or a zero length array
the number of bytes is not returned.
- Parameters:
where
- The byte array where the result will be written.len
- A placeholder for returning the number of bytes in
the serial state.
- Returns:
- Serial state of the object as a byte array.
- Throws:
CacheException
- See Also:
serialize()
,
Oid.Oid(byte[])
open
public static SerialObject open(Database db,
byte[] serialState)
throws CacheException
- Throws:
CacheException