|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.PersistenceCloner
Field Summary | |
private ArrayList |
attributeName
|
private ArrayList |
attributeValue
|
private ByteArrayOutputStream |
baos
|
private static boolean |
chatter
|
private static String |
CLASSNAME
|
static boolean |
DEBUG
|
private int |
depth
|
private PDSEncoder |
encoder
|
private static DebugWriter |
LOG
|
private int |
readIndex
|
private static boolean |
requiredObject
|
private static boolean |
showCloning
|
private static boolean |
showNullObjects
|
private static boolean |
showOids
|
private Class |
targetClass
|
private int |
writeIndex
|
Fields inherited from interface wt.pds.PersistentStoreIfc |
versionID |
Fields inherited from interface wt.pds.PersistentRetrieveIfc |
versionID |
Constructor Summary | |
PersistenceCloner(ObjectMappable obj)
|
Method Summary | |
private boolean |
aNullObject(int read_index)
|
void |
close()
Immediately release a ResultSet's datastore and connection resources |
private void |
createPseudoObj(Class desired_class)
|
private Object |
dynamicCloner(Cloneable anObj)
|
private Object |
genericCloner(Object object)
|
InputStream |
getAsciiStream(String attribute_name)
Get the value of a column in the current row as a stream of ASCII characters. |
BigDecimal |
getBigDecimal(String attribute_name)
Get the value of a column in the current row as a BigDecimal |
InputStream |
getBinaryStream(String attribute_name)
Get the value of a column in the current row as a stream of uninterpreted bytes. |
boolean |
getBoolean(String attribute_name)
Get the value of a column in the current row as a Java boolean. |
Boolean |
getBooleanObject(String attribute_name)
Get the value of a column in the current row as a Boolean. |
byte |
getByte(String attribute_name)
Get the value of a column in the current row as a Java byte. |
Byte |
getByteObject(String attribute_name)
Get the value of a column in the current row as a Byte. |
byte[] |
getBytes(String attribute_name)
Get the value of a column in the current row as a Java byte array. |
char |
getChar(String attribute_name)
Get the value of a column in the current row as a Java char. |
Character |
getCharObject(String attribute_name)
Get the value of a column in the current row as a Character. |
ObjectMappable |
getClone()
|
ObjectMappable |
getClone(ObjectMappable target)
|
String |
getContainer()
Get the current container name. |
Date |
getDate(String attribute_name)
Get the value of a column in the current row as a java.sql.Date object. |
double |
getDouble(String attribute_name)
Get the value of a column in the current row as a Java double. |
Double |
getDoubleObject(String attribute_name)
Get the value of a column in the current row as a Double. |
float |
getFloat(String attribute_name)
Get the value of a column in the current row as a Java float. |
Float |
getFloatObject(String attribute_name)
Get the value of a column in the current row as a Float. |
Object |
getInlineObject(String attributeName,
String blobAttributeName)
Get the value of a blob column as a Java Object. |
int |
getInt(String attribute_name)
Get the value of a column in the current row as a Java int. |
Integer |
getIntObject(String attribute_name)
Get the value of a column in the current row as an Integer. |
LobLocator |
getLobLocator(String attribute_name)
Get a LobLocator for the given attribute. |
long |
getLong(String attribute_name)
Get the value of a column in the current row as a Java long. |
Long |
getLongObject(String attribute_name)
Get the value of a column in the current row as a Long. |
Object |
getObject(String attribute_name)
Get the value of a column in the current row as a Java object. |
short |
getShort(String attribute_name)
Get the value of a column in the current row as a Java short. |
Short |
getShortObject(String attribute_name)
Get the value of a column in the current row as a Short. |
Object |
getSmallObject(String attribute_name)
Get the value of a column in the current row as a Java object. |
String |
getString(String attribute_name)
Get the value of a column in the current row as a Java String. |
Time |
getTime(String attribute_name)
Get the value of a column in the current row as a java.sql.Time object. |
Timestamp |
getTimestamp(String attribute_name)
Get the value of a column in the current row as a java.sql.Timestamp object. |
InputStream |
getUnicodeStream(String attribute_name)
Get the value of a column in the current row as a stream of Unicode characters and then read in chunks. |
boolean |
next()
A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc. |
void |
oidShow(String info,
ObjectMappable obj)
|
ObjectMappable |
readObject(String attribute_name,
ObjectMappable obj,
Class concrete_class,
boolean is_required)
Get the values corresponding to a nested ObjectMappable Object. |
void |
setAsciiStream(String attribute_name,
InputStream aStream,
int len)
Set the value to an ascii stream. |
void |
setBigDecimal(String attribute_name,
BigDecimal aBigDecimal)
Set the value to a BigDecimal. |
void |
setBinaryStream(String attribute_name,
InputStream aStream,
int len)
Set the value to a binary stream. |
void |
setBoolean(String attribute_name,
boolean aBool)
Set the value to a Java boolean. |
void |
setBooleanObject(String attribute_name,
Boolean aBool)
Set the value to a Boolean. |
void |
setByte(String attribute_name,
byte aByte)
Set the value to a Java byte. |
void |
setByteObject(String attribute_name,
Byte aByte)
Set the value to a Byte. |
void |
setBytes(String attribute_name,
byte[] bArray)
Set the value to a Java byte array. |
void |
setChar(String attribute_name,
char aChar)
Set the value to a Java char. |
void |
setCharObject(String attribute_name,
Character aChar)
Set the value to a Character. |
void |
setDate(String attribute_name,
Date aDate)
Set the value to a java.util.Date. |
void |
setDouble(String attribute_name,
double aDbl)
Set the value to a Java double. |
void |
setDoubleObject(String attribute_name,
Double aDbl)
Set the value to a Double. |
void |
setFloat(String attribute_name,
float aFloat)
Set the value to a Java float. |
void |
setFloatObject(String attribute_name,
Float aFloat)
Set the value to a Float. |
void |
setInlineObject(String attribute_name,
String blobAttributeName,
Serializable anObj)
Set the value to a Java Serializable Object. |
void |
setInt(String attribute_name,
int anInt)
Set the value to a Java int. |
void |
setIntObject(String attribute_name,
Integer anInt)
Set the value to a Integer. |
void |
setLobLocator(String attribute_name,
LobLocator aLL)
Set the value to a Lob locator. |
void |
setLong(String attribute_name,
long aLong)
Set the value to a Java long. |
void |
setLongObject(String attribute_name,
Long aLong)
Set the value to a Long. |
void |
setNull(String attribute_name,
int sqltype)
Set the value to a null. |
void |
setObject(String attribute_name,
Object anObj)
Set the value to a Java object. |
void |
setShort(String attribute_name,
short aShort)
Set the value to a Java short. |
void |
setShortObject(String attribute_name,
Short aShort)
Set the value to a Short. |
void |
setSmallObject(String attribute_name,
Serializable anObj)
Set the value to a Java object. |
void |
setString(String attribute_name,
String aString)
Set the value to a Java String. |
void |
setTime(String attribute_name,
Time aTime)
Set the value to a Java Timee. |
void |
setTimestamp(String attribute_name,
Timestamp aTimestamp)
Set the value to a Java Timestamp. |
void |
setUnicodeStream(String attribute_name,
InputStream aStream,
int len)
Set the value to a Java Unicode stream. |
private Object |
streamCloneObj(Object object)
|
boolean |
wasNull()
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. |
void |
writeObject(String attribute_name,
ObjectMappable obj,
Class concrete_class,
boolean is_required)
Set the values corresponding to a nested ObjectMappable Object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Class targetClass
private ArrayList attributeName
private ArrayList attributeValue
private int readIndex
private int writeIndex
private int depth
private PDSEncoder encoder
private ByteArrayOutputStream baos
private static final boolean chatter
private static final boolean showOids
private static final boolean showNullObjects
private static final boolean requiredObject
private static final boolean showCloning
private static final String CLASSNAME
public static final boolean DEBUG
private static final DebugWriter LOG
Constructor Detail |
public PersistenceCloner(ObjectMappable obj) throws RuntimeException
Method Detail |
public ObjectMappable getClone() throws RuntimeException
RuntimeException
public ObjectMappable getClone(ObjectMappable target) throws RuntimeException
RuntimeException
public InputStream getAsciiStream(String attribute_name)
PersistentRetrieveIfc
getAsciiStream
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public BigDecimal getBigDecimal(String attribute_name)
PersistentRetrieveIfc
getBigDecimal
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public InputStream getBinaryStream(String attribute_name)
PersistentRetrieveIfc
getBinaryStream
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public boolean getBoolean(String attribute_name)
PersistentRetrieveIfc
getBoolean
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Boolean getBooleanObject(String attribute_name)
PersistentRetrieveIfc
getBooleanObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public byte getByte(String attribute_name)
PersistentRetrieveIfc
getByte
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Byte getByteObject(String attribute_name)
PersistentRetrieveIfc
getByteObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public byte[] getBytes(String attribute_name)
PersistentRetrieveIfc
getBytes
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public char getChar(String attribute_name)
PersistentRetrieveIfc
getChar
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Character getCharObject(String attribute_name)
PersistentRetrieveIfc
getCharObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Date getDate(String attribute_name)
PersistentRetrieveIfc
getDate
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public double getDouble(String attribute_name)
PersistentRetrieveIfc
getDouble
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Double getDoubleObject(String attribute_name)
PersistentRetrieveIfc
getDoubleObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public float getFloat(String attribute_name)
PersistentRetrieveIfc
getFloat
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Float getFloatObject(String attribute_name)
PersistentRetrieveIfc
getFloatObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Object getInlineObject(String attributeName, String blobAttributeName) throws SQLException, DatastoreException
PersistentRetrieveIfc
getInlineObject
in interface PersistentRetrieveIfc
attributeName
- a class attribute nameblobAttributeName
- a blob attribute name
SQLException
- if a database-access error occurs.
DatastoreException
public int getInt(String attribute_name)
PersistentRetrieveIfc
getInt
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Integer getIntObject(String attribute_name)
PersistentRetrieveIfc
getIntObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public long getLong(String attribute_name)
PersistentRetrieveIfc
getLong
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Long getLongObject(String attribute_name)
PersistentRetrieveIfc
getLongObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Object getObject(String attribute_name)
PersistentRetrieveIfc
getObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Object getSmallObject(String attribute_name)
PersistentRetrieveIfc
getSmallObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public short getShort(String attribute_name)
PersistentRetrieveIfc
getShort
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Short getShortObject(String attribute_name)
PersistentRetrieveIfc
getShortObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public String getString(String attribute_name)
PersistentRetrieveIfc
getString
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Time getTime(String attribute_name)
PersistentRetrieveIfc
getTime
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public Timestamp getTimestamp(String attribute_name)
PersistentRetrieveIfc
getTimestamp
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public InputStream getUnicodeStream(String attribute_name)
PersistentRetrieveIfc
getUnicodeStream
in interface PersistentRetrieveIfc
attribute_name
- a class attribute name
public LobLocator getLobLocator(String attribute_name)
PersistentRetrieveIfc
getLobLocator
in interface PersistentRetrieveIfc
attribute_name
- a class attribute nameprivate boolean aNullObject(int read_index)
public ObjectMappable readObject(String attribute_name, ObjectMappable obj, Class concrete_class, boolean is_required)
PersistentRetrieveIfc
readExternal
method.
readObject
in interface PersistentRetrieveIfc
attribute_name
- a class attribute nameobj
- the nested objectconcrete_class
- the class to instantiate if neededpublic String getContainer()
PersistentStoreIfc
writeObject
.
getContainer
in interface PersistentStoreIfc
public boolean next()
PersistentRetrieveIfc
next
in interface PersistentRetrieveIfc
public void close()
PersistentRetrieveIfc
close
in interface PersistentRetrieveIfc
public boolean wasNull()
PersistentRetrieveIfc
wasNull
in interface PersistentRetrieveIfc
public void setAsciiStream(String attribute_name, InputStream aStream, int len)
PersistentStoreIfc
setAsciiStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter valuelen
- the length of the input streampublic void setBigDecimal(String attribute_name, BigDecimal aBigDecimal)
PersistentStoreIfc
setBigDecimal
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBigDecimal
- the parameter valuepublic void setBinaryStream(String attribute_name, InputStream aStream, int len)
PersistentStoreIfc
setBinaryStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter valuelen
- the length of the input streampublic void setBoolean(String attribute_name, boolean aBool)
PersistentStoreIfc
setBoolean
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBool
- the parameter valuepublic void setBooleanObject(String attribute_name, Boolean aBool)
PersistentStoreIfc
setBooleanObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaBool
- the parameter valuepublic void setByte(String attribute_name, byte aByte)
PersistentStoreIfc
setByte
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaByte
- the parameter valuepublic void setByteObject(String attribute_name, Byte aByte)
PersistentStoreIfc
setByteObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaByte
- the parameter valuepublic void setBytes(String attribute_name, byte[] bArray)
PersistentStoreIfc
setBytes
in interface PersistentStoreIfc
attribute_name
- a class attribute namebArray
- the parameter valuepublic void setChar(String attribute_name, char aChar)
PersistentStoreIfc
setChar
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaChar
- the parameter valuepublic void setCharObject(String attribute_name, Character aChar)
PersistentStoreIfc
setCharObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaChar
- the parameter valuepublic void setDate(String attribute_name, Date aDate)
PersistentStoreIfc
setDate
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDate
- the parameter valuepublic void setDouble(String attribute_name, double aDbl)
PersistentStoreIfc
setDouble
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDbl
- the parameter valuepublic void setDoubleObject(String attribute_name, Double aDbl)
PersistentStoreIfc
setDoubleObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaDbl
- the parameter valuepublic void setFloat(String attribute_name, float aFloat)
PersistentStoreIfc
setFloat
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaFloat
- the parameter valuepublic void setFloatObject(String attribute_name, Float aFloat)
PersistentStoreIfc
setFloatObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaFloat
- the parameter valuepublic void setInlineObject(String attribute_name, String blobAttributeName, Serializable anObj) throws SQLException, DatastoreException
PersistentStoreIfc
setInlineObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameblobAttributeName
- a blob attribute nameanObj
- the serializable object
SQLException
- if a database-access error occurs.
DatastoreException
public void setInt(String attribute_name, int anInt)
PersistentStoreIfc
setInt
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanInt
- the parameter valuepublic void setIntObject(String attribute_name, Integer anInt)
PersistentStoreIfc
setIntObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanInt
- the parameter valuepublic void setLong(String attribute_name, long aLong)
PersistentStoreIfc
setLong
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLong
- the parameter valuepublic void setLongObject(String attribute_name, Long aLong)
PersistentStoreIfc
setLongObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLong
- the parameter valuepublic void setNull(String attribute_name, int sqltype)
PersistentStoreIfc
setNull
in interface PersistentStoreIfc
attribute_name
- a class attribute namesqltype
- the SQL type of the attributepublic void setObject(String attribute_name, Object anObj)
PersistentStoreIfc
setObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanObj
- the parameter valuepublic void setSmallObject(String attribute_name, Serializable anObj)
PersistentStoreIfc
setSmallObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameanObj
- the parameter valuepublic void setShort(String attribute_name, short aShort)
PersistentStoreIfc
setShort
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaShort
- the parameter valuepublic void setShortObject(String attribute_name, Short aShort)
PersistentStoreIfc
setShortObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaShort
- the parameter valuepublic void setString(String attribute_name, String aString)
PersistentStoreIfc
setString
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaString
- the parameter valuepublic void setTime(String attribute_name, Time aTime)
PersistentStoreIfc
setTime
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaTime
- the parameter valuepublic void setTimestamp(String attribute_name, Timestamp aTimestamp)
PersistentStoreIfc
setTimestamp
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaTimestamp
- the parameter valuepublic void setUnicodeStream(String attribute_name, InputStream aStream, int len)
PersistentStoreIfc
setUnicodeStream
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaStream
- the parameter valuepublic void setLobLocator(String attribute_name, LobLocator aLL)
PersistentStoreIfc
setLobLocator
in interface PersistentStoreIfc
attribute_name
- a class attribute nameaLL
- the parameter valueprivate void createPseudoObj(Class desired_class)
public void writeObject(String attribute_name, ObjectMappable obj, Class concrete_class, boolean is_required)
PersistentStoreIfc
writeExternal
method.
writeObject
in interface PersistentStoreIfc
attribute_name
- a class attribute nameobj
- the nested objectconcrete_class
- the class of the object (in case obj is null)public void oidShow(String info, ObjectMappable obj)
private Object genericCloner(Object object)
private Object dynamicCloner(Cloneable anObj) throws Exception
Exception
private Object streamCloneObj(Object object) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |