public class UpdateObjectDescImpl extends Object implements UpdateObjectDesc
LOG_CREATE, LOG_DESTROY, LOG_NOOP, LOG_UPDATE, OP_ABS, OP_ADD, OP_AND, OP_APPROX, OP_AVG, OP_BETWEEN, OP_CONCAT, OP_COUNT, OP_COUNT_PC, OP_DISTINCT, OP_DIV, OP_EQ, OP_EQ_CLASS, OP_EQUIJOIN, OP_EXISTS, OP_FIELD, OP_FOR_UPDATE, OP_GE, OP_GT, OP_IN, OP_LE, OP_LEFTJOIN, OP_LENGTH, OP_LENGTHB, OP_LIKE, OP_LIKE_ESCAPE, OP_LOWER, OP_LT, OP_LTRIM, OP_MAX, OP_MAX_ROWS, OP_MAYBE_NULL, OP_MIN, OP_MOD, OP_MUL, OP_NE, OP_NONKEY, OP_NONREL_JOIN, OP_NOT, OP_NOTEXISTS, OP_NOTIN, OP_NOTNULL, OP_NULL, OP_NULL_COMPARISION_FUNCTION, OP_OR, OP_ORDERBY, OP_ORDERBY_DESC, OP_PARAMETER, OP_PARAMETER_COUNT, OP_POSITION, OP_POSITION_START, OP_RIGHTJOIN, OP_RTRIM, OP_RTRIMFIXED, OP_SOUNDEX, OP_SQRT, OP_SUB, OP_SUBSTR, OP_SUBSTRB, OP_SUBSTRING, OP_SUM, OP_UPPER, OP_VALUE| Constructor and Description |
|---|
UpdateObjectDescImpl(Class pcClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearUpdatedJoinTableRelationships() |
SQLStateManager |
getAfterImage() |
Object |
getAfterValue(FieldDesc f) |
Object |
getBeforeValue(FieldDesc f) |
Concurrency |
getConcurrency() |
ClassDesc |
getConfig() |
Class |
getPersistenceCapableClass() |
int |
getUpdateAction() |
List |
getUpdatedFields() |
Collection |
getUpdatedJoinTableFields() |
Collection |
getUpdateJoinTableDescs(FieldDesc fieldDesc) |
boolean |
hasChangedRelationships()
Returns
true, if this state manager has a changed
relationship field. |
boolean |
hasModifiedLobField()
Returns
true if any of the changed fields is byte[]. |
boolean |
hasUpdatedFields() |
boolean |
hasUpdatedJoinTableRelationships() |
boolean |
hasVersionConsistency() |
void |
incrementVersion()
Triggers the version update if the associated state manager is
registered for version consistency and database fields have been
modified.
|
boolean |
isBeforeImageRequired() |
void |
markRelationshipChange(FieldDesc fieldDesc)
Marks the relationship change property for this instance, if the
updated field is a relationship field or a hidden field tracing a
foreign key column in the database.
|
void |
recordUpdatedField(LocalFieldDesc fieldDesc) |
void |
recordUpdatedJoinTableRelationship(ForeignFieldDesc fieldDesc,
SQLStateManager parentSM,
SQLStateManager foreignSM,
int action)
Schedules a jointable entry for relationship field
fieldDesc. |
boolean |
removeUpdatedJoinTableRelationship(ForeignFieldDesc fieldDesc,
SQLStateManager foreignSM,
int action)
Removes a previously scheduled jointable entry for relationship
field
fieldDesc. |
void |
reset() |
void |
setConcurrency(Concurrency concurrency) |
void |
setObjectInfo(StateManager biStateManager,
StateManager aiStateManager,
int action)
We send the AfterImage for updates and inserts
but for updates it will only hold values for updated attributes (unless
the class is configured to send the whole AfterImage, also we'll let the
concurrency interface affect the sent AfterImage (and the sent
BeforeImage)).
|
void |
setVerificationFailed()
Marks the associated state manager as failed.
|
public UpdateObjectDescImpl(Class pcClass)
public Class getPersistenceCapableClass()
getPersistenceCapableClass in interface ActionDescpublic void reset()
public boolean hasUpdatedFields()
public Collection getUpdatedJoinTableFields()
public Collection getUpdateJoinTableDescs(FieldDesc fieldDesc)
public boolean hasUpdatedJoinTableRelationships()
public boolean hasModifiedLobField()
true if any of the changed fields is byte[].public void markRelationshipChange(FieldDesc fieldDesc)
fieldDesc - Updated field.public boolean hasChangedRelationships()
true, if this state manager has a changed
relationship field.public boolean removeUpdatedJoinTableRelationship(ForeignFieldDesc fieldDesc, SQLStateManager foreignSM, int action)
fieldDesc. The action
parameter specifies, if the entry to be removed is
scheduled for creation or removal.fieldDesc - Updated relationship field.foreignSM - Associated state manager on the opposite side.action - The action is either CREATE or REMOVE.recordUpdatedJoinTableRelationship(com.sun.jdo.spi.persistence.support.sqlstore.model.ForeignFieldDesc, com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager, com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager, int)public void recordUpdatedJoinTableRelationship(ForeignFieldDesc fieldDesc, SQLStateManager parentSM, SQLStateManager foreignSM, int action)
fieldDesc. The scheduled jointable entry is
uniquely identified by the relationship field and the two
associated state managers. The action parameter
specifies, if the jointable entry should be created or removed.fieldDesc - Updated relationship field.parentSM - State manager responsible for fieldDesc's defining class.foreignSM - State manager responsible for the other side.action - The action is either CREATE or REMOVE.removeUpdatedJoinTableRelationship(com.sun.jdo.spi.persistence.support.sqlstore.model.ForeignFieldDesc, com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager, int)public void clearUpdatedJoinTableRelationships()
public void recordUpdatedField(LocalFieldDesc fieldDesc)
public List getUpdatedFields()
public int getUpdateAction()
public ClassDesc getConfig()
public SQLStateManager getAfterImage()
public boolean isBeforeImageRequired()
public Concurrency getConcurrency()
public void setConcurrency(Concurrency concurrency)
public void setObjectInfo(StateManager biStateManager, StateManager aiStateManager, int action)
setObjectInfo in interface UpdateObjectDescpublic void incrementVersion()
public void setVerificationFailed()
public boolean hasVersionConsistency()
Copyright © 2017. All rights reserved.