|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.sql.CoreDO | +--com.lutris.appserver.server.sql.CloneableDO | +--com.lutris.dods.builder.generator.dataobject.GenericDO
Field Summary | |
protected boolean |
dirty
|
Fields inherited from class com.lutris.appserver.server.sql.CoreDO |
persistent,
versioning |
Constructor Summary | |
GenericDO()
Public constructor. |
|
GenericDO(boolean isView)
Public constructor. |
|
GenericDO(ObjectId id)
Public constructor. |
|
GenericDO(java.sql.ResultSet rs)
Public constructor. |
Method Summary | |
java.lang.Object |
cloneUnique()
Creates a clone of the object, but ensures that a new and unique object id is created for the object and that the version number is set to zero. |
void |
delete()
|
void |
executeDelete(DBConnection conn)
Deletes this object from the database. |
void |
executeInsert(DBConnection conn)
Updates the contents of this object in the database but only if the datab object is dirty. |
void |
executeUpdate(DBConnection conn)
Updates the contents of this object in the database but only if the datab object is dirty. |
void |
finalizeInsert(boolean success)
If transaction succeeded marks this object as clean. |
void |
finalizeUpdate(boolean success)
If transaction succeeded marks this object as clean. |
protected static java.lang.String |
getPrimaryKeyName()
Return the name of the primary key column. |
boolean |
isDirty()
isDirty() returns true if this object has been
modified (needs to be updated to the database). |
protected void |
makeIdentical(GenericDO obj)
makeIdentical() Used by subclasses to assign any data members to this data object. |
protected void |
markClean()
markClean() with no arguments is used to indicate that
this object is marked as "clean"
(it does not need to be updated to the database). |
protected void |
markNewValue()
markNewValue() with no arguments is used to indicate that
this object is marked as "dirty" (in need of an update to the database). |
protected java.math.BigDecimal |
markNewValue(java.math.BigDecimal current_bd,
java.math.BigDecimal new_bd)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected boolean |
markNewValue(boolean current_boolean,
boolean new_boolean)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected byte[] |
markNewValue(byte[] current_val,
byte[] new_val)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected byte |
markNewValue(byte current_byte,
byte new_byte)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected char |
markNewValue(char current_char,
char new_char)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.util.Date |
markNewValue(java.util.Date current_date,
java.util.Date new_date)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.sql.Date |
markNewValue(java.sql.Date current_val,
java.sql.Date new_val)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected double |
markNewValue(double current_double,
double new_double)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected float |
markNewValue(float current_float,
float new_float)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected GenericDO |
markNewValue(GenericDO current_DO,
GenericDO new_DO)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected int |
markNewValue(int current_int,
int new_int)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected long |
markNewValue(long current_long,
long new_long)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected ObjectId |
markNewValue(ObjectId current_OId,
ObjectId new_OId)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected short |
markNewValue(short current_short,
short new_short)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.lang.String |
markNewValue(java.lang.String current_string,
java.lang.String new_string,
int max_length,
boolean nullOK)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.lang.String |
markNewValue(java.lang.String current_string,
java.lang.String new_string,
int min_length,
int max_length,
boolean nullOK)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.sql.Timestamp |
markNewValue(java.sql.Timestamp current_val,
java.sql.Timestamp new_val)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected java.sql.Time |
markNewValue(java.sql.Time current_val,
java.sql.Time new_val)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
static void |
printMsg(int level,
java.lang.String s)
|
protected void |
setOId(ObjectId oId)
Sets this object's identifier. |
protected void |
setPrepStmtParam_BigDecimal(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.math.BigDecimal value)
|
protected void |
setPrepStmtParam_boolean(java.sql.PreparedStatement stmt,
int[] paramIndex,
boolean value)
|
protected void |
setPrepStmtParam_byte(java.sql.PreparedStatement stmt,
int[] paramIndex,
byte value)
|
protected void |
setPrepStmtParam_bytes(java.sql.PreparedStatement stmt,
int[] paramIndex,
byte[] value)
|
protected void |
setPrepStmtParam_DO(java.sql.PreparedStatement stmt,
int[] paramIndex,
GenericDO value)
If the current data member value differs from the new value, this object is marked as "dirty" (in need of an update to the database). |
protected void |
setPrepStmtParam_double(java.sql.PreparedStatement stmt,
int[] paramIndex,
double value)
|
protected void |
setPrepStmtParam_float(java.sql.PreparedStatement stmt,
int[] paramIndex,
float value)
|
protected void |
setPrepStmtParam_int(java.sql.PreparedStatement stmt,
int[] paramIndex,
int value)
|
protected void |
setPrepStmtParam_java_math_BigDecimal(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.math.BigDecimal value)
|
protected void |
setPrepStmtParam_java_sql_Date(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.sql.Date value)
|
protected void |
setPrepStmtParam_java_sql_Time(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.sql.Time value)
|
protected void |
setPrepStmtParam_java_sql_Timestamp(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.sql.Timestamp value)
|
protected void |
setPrepStmtParam_long(java.sql.PreparedStatement stmt,
int[] paramIndex,
long value)
|
protected void |
setPrepStmtParam_short(java.sql.PreparedStatement stmt,
int[] paramIndex,
short value)
|
protected void |
setPrepStmtParam_String(java.sql.PreparedStatement stmt,
int[] paramIndex,
java.lang.String value)
|
java.lang.String |
toString(int x)
|
Methods inherited from class com.lutris.appserver.server.sql.CloneableDO |
clone |
Methods inherited from class com.lutris.appserver.server.sql.CoreDO |
disableVersioning,
finalizeDelete,
getDeleteStatement,
getInsertStatement,
getNewVersion,
getOId,
getOIdColumnName,
getTableName,
getUpdateStatement,
getVersion,
getVersionColumnName,
isPersistent,
setNewVersion,
setOIdColumnName,
setPersistent,
setVersion,
setVersionColumnName |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean dirty
Constructor Detail |
public GenericDO() throws ObjectIdException, DatabaseManagerException
public GenericDO(boolean isView) throws ObjectIdException, DatabaseManagerException
public GenericDO(ObjectId id) throws ObjectIdException, DatabaseManagerException
public GenericDO(java.sql.ResultSet rs) throws java.sql.SQLException, ObjectIdException
rs
- a result set.Method Detail |
public static void printMsg(int level, java.lang.String s)
public java.lang.Object cloneUnique() throws DatabaseManagerException, ObjectIdException
protected void makeIdentical(GenericDO obj)
orig
- The original DO.public void executeUpdate(DBConnection conn) throws java.sql.SQLException, DBRowUpdateException
conn
- the database connection.public void executeInsert(DBConnection conn) throws java.sql.SQLException, DBRowUpdateException
conn
- the database connection.public void executeDelete(DBConnection conn) throws java.sql.SQLException
conn
- Database connection.public void finalizeInsert(boolean success)
success
- true if the transaction succeeded
and this object was successfully inserted into the database.public void finalizeUpdate(boolean success)
success
- true if the transaction succeeded
and this object was successfully updated in the database.protected static java.lang.String getPrimaryKeyName()
CoreDO
protected void setOId(ObjectId oId)
oId
- this object's identifier.public boolean isDirty()
isDirty()
returns true if this object has been
modified (needs to be updated to the database).protected void markClean()
markClean()
with no arguments is used to indicate that
this object is marked as "clean"
(it does not need to be updated to the database).
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
protected void markNewValue()
markNewValue()
with no arguments is used to indicate that
this object is marked as "dirty" (in need of an update to the database).
There is no way to mark this object as "clean";executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
protected java.lang.String markNewValue(java.lang.String current_string, java.lang.String new_string, int max_length, boolean nullOK)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value,
max_length, nullOK )
If nullOK
is false and new_field_value
is null, this.field
is set to ""
.
current_string
- The current value of the String data member.new_string
- The new value of the String data member.max_length
- The maximum allowed length of the String value.
If the new_string is longer than max_length, new_string is truncated.
If max_length is less than 1, no maximum is imposed.protected java.lang.String markNewValue(java.lang.String current_string, java.lang.String new_string, int min_length, int max_length, boolean nullOK)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value,
min_length, max_length, nullOK )
If min_length > 0
and
nullOK
is false and
new_field_value
is null,
this.field
is returned
(the new_field_value
is ignored.)
current_string
- The current value of the String data member.new_string
- The new value of the String data member.min_length
- The minimum allowed length of the String value.
If the new_string is shorter than min_length, new_string is ignored.
If min_length is less than 0, no minimum is imposed.max_length
- The maximum allowed length of the String value.
If the new_string is longer than max_length, new_string is truncated.
If max_length is less than 1, no maximum is imposed.protected ObjectId markNewValue(ObjectId current_OId, ObjectId new_OId)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_OId
- The current value of the ObjectId data member.new_OId
- The new value of the ObjectId data member.protected java.util.Date markNewValue(java.util.Date current_date, java.util.Date new_date)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_date
- The current value of the Date data member.new_date
- The new value of the Date data member.protected java.math.BigDecimal markNewValue(java.math.BigDecimal current_bd, java.math.BigDecimal new_bd)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_bd
- The current value of the BigDecimal data member.new_bd
- The new value of the BigDecimal data member.protected byte[] markNewValue(byte[] current_val, byte[] new_val)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
curr_val
- The current value of the byte array data member.new_val
- The new value of the byte array data member.protected java.sql.Date markNewValue(java.sql.Date current_val, java.sql.Date new_val)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_val
- The current value of the java.sql.Date data member.new_val
- The new value of the java.sql.Date data member.protected java.sql.Time markNewValue(java.sql.Time current_val, java.sql.Time new_val)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_val
- The current value of the java.sql.Time data member.new_val
- The new value of the java.sql.Time data member.protected java.sql.Timestamp markNewValue(java.sql.Timestamp current_val, java.sql.Timestamp new_val)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_val
- The current value of the java.sql.Timestamp data member.new_val
- The new value of the java.sql.Timestamp data member.protected int markNewValue(int current_int, int new_int)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_int
- The current value of the int data member.new_int
- The new value of the int data member.protected float markNewValue(float current_float, float new_float)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_float
- The current value of the float data member.new_float
- The new value of the float data member.protected double markNewValue(double current_double, double new_double)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_double
- The current value of the double data member.new_double
- The new value of the double data member.protected boolean markNewValue(boolean current_boolean, boolean new_boolean)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_boolean
- The current value of the boolean data member.new_boolean
- The new value of the boolean data member.protected char markNewValue(char current_char, char new_char)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_char
- The current value of the char data member.new_char
- The new value of the char data member.protected byte markNewValue(byte current_byte, byte new_byte)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_byte
- The current value of the byte data member.new_byte
- The new value of the byte data member.protected short markNewValue(short current_short, short new_short)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_short
- The current value of the short data member.new_short
- The new value of the short data member.protected long markNewValue(long current_long, long new_long)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_long
- The current value of the long data member.new_long
- The new value of the long data member.protected GenericDO markNewValue(GenericDO current_DO, GenericDO new_DO)
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_long
- The current value of the long data member.new_long
- The new value of the long data member.protected void setPrepStmtParam_DO(java.sql.PreparedStatement stmt, int[] paramIndex, GenericDO value) throws java.sql.SQLException
executeInsert()
and executeUpdate()
methods can make that so.
This method is protected since only derived Data Objects (DO's)
"set
" methods will be calling it.
This method returns the new value as a convenience to the calling
"set
" method. The usage is:
this.field = markNewValue( this.field, new_field_value )
current_ts
- The current value of the long data member.new_ts
- The new value of the long data member.protected void setPrepStmtParam_String(java.sql.PreparedStatement stmt, int[] paramIndex, java.lang.String value) throws java.sql.SQLException
protected void setPrepStmtParam_float(java.sql.PreparedStatement stmt, int[] paramIndex, float value) throws java.sql.SQLException
protected void setPrepStmtParam_int(java.sql.PreparedStatement stmt, int[] paramIndex, int value) throws java.sql.SQLException
protected void setPrepStmtParam_java_math_BigDecimal(java.sql.PreparedStatement stmt, int[] paramIndex, java.math.BigDecimal value) throws java.sql.SQLException
protected void setPrepStmtParam_BigDecimal(java.sql.PreparedStatement stmt, int[] paramIndex, java.math.BigDecimal value) throws java.sql.SQLException
protected void setPrepStmtParam_java_sql_Date(java.sql.PreparedStatement stmt, int[] paramIndex, java.sql.Date value) throws java.sql.SQLException
protected void setPrepStmtParam_java_sql_Time(java.sql.PreparedStatement stmt, int[] paramIndex, java.sql.Time value) throws java.sql.SQLException
protected void setPrepStmtParam_java_sql_Timestamp(java.sql.PreparedStatement stmt, int[] paramIndex, java.sql.Timestamp value) throws java.sql.SQLException
protected void setPrepStmtParam_bytes(java.sql.PreparedStatement stmt, int[] paramIndex, byte[] value) throws java.sql.SQLException
protected void setPrepStmtParam_double(java.sql.PreparedStatement stmt, int[] paramIndex, double value) throws java.sql.SQLException
protected void setPrepStmtParam_long(java.sql.PreparedStatement stmt, int[] paramIndex, long value) throws java.sql.SQLException
protected void setPrepStmtParam_short(java.sql.PreparedStatement stmt, int[] paramIndex, short value) throws java.sql.SQLException
protected void setPrepStmtParam_byte(java.sql.PreparedStatement stmt, int[] paramIndex, byte value) throws java.sql.SQLException
protected void setPrepStmtParam_boolean(java.sql.PreparedStatement stmt, int[] paramIndex, boolean value) throws java.sql.SQLException
public java.lang.String toString(int x)
public void delete() throws java.sql.SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |