|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.taggercat.model.DataSource
public class DataSource
Encapsulates a named HNB8 query and it's associated result set, or a child collection of a parent entity.
Obviously, the size this class has gotten out of hand, and it is now horribly too long. We plan to split into two classes, one for parent datasources, and a second one for child data sources. However, we've done a ton of totally free work... so if you don't like this; then offer to fund the time needed, or pitch in yourself, to refactor this into two classes.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static class |
DataSource.PropertyComparator
The comparator used when sorting child data sources |
| Constructor Summary | |
|---|---|
DataSource()
Creates a new data source object. |
|
DataSource(DataSourceInitParameter parameterObject)
|
|
| Method Summary | ||
|---|---|---|
void |
addAutoFilterWhereClauseField(java.lang.String columName,
java.lang.String[] values)
Adds a columnName - values term to the autoFilter where clause |
|
void |
addDataSourceEventListener(DataSourceEventListener listener)
Adds a DataSourceEventListener to this
data source. |
|
void |
addQBFParameter(java.lang.String propertyName,
java.lang.String propertyValue)
Adds a parameter to the QBF criteria. |
|
void |
addSelectedRowID(java.lang.String rowID)
Adds a rowID to the list of selected row IDs. |
|
void |
addSortOrderTerm(java.lang.String orderByTerm)
Adds an additional term to the order by clause. |
|
java.lang.String |
applyProfanityFilter(java.lang.String strValue)
|
|
void |
assignDerivations(TCEntity entity,
com.taggercat.el.ELContext elContext)
|
|
void |
buildDetachedCriteria(java.lang.String userWhereClause)
Build a detached criteria, since we need to be able to re-use the same definition later in Auto-Filter type queries.later in Auto-Filter type queries. |
|
void |
checkEntityConstraints(TCEntity entity,
java.util.Map<java.lang.String,java.lang.Boolean> additionalContextParms)
Check that the entity is in a state that does not violate any entity level constraints. |
|
void |
checkPropertyConstraints(TCEntity entity,
java.lang.String propertyName,
com.taggercat.el.ELContext elContext,
boolean validateOnly)
Check that the new value does not violate any property level constraints. |
|
void |
clearAutoFilterWhereClause()
Clears the Auto Filter Where clause and fields. |
|
void |
clearModfiedFlags()
Clear all modified and inserted properties |
|
void |
clearQBFWhereClause()
Clears the QBF WHERE clause and fields. |
|
void |
clearSelectedRowIDs()
Clears the selectedRowIDs list. |
|
void |
close()
|
|
void |
delete()
Deletes the current entity from the resultset ( the previous entity becomes the current entity). |
|
void |
deleteSelected()
Deletes selected entities from resultset ( the entity prior to the final deletion becomes current if current entity at time of method call cannot be restored). |
|
void |
executeQuery()
Executes the query on the data source. |
|
java.util.List<TCEntity> |
findAll(IResultSetCollection resultset,
java.lang.String expression)
Returns a list of all entities in the current result-set that match the expression. |
|
java.util.List<TCEntity> |
findAll(java.lang.String expression)
Returns a list of all entities in the current result-set that match the expression. |
|
TCEntity |
findFirst(java.lang.String expression)
Finds the first entity in the resultset that returns true for the expression. |
|
TCEntity |
first()
Positions the resultset to first tcEntity or block of rows. |
|
java.lang.String |
getAutoFilterField(java.lang.String propertyName)
Gets the current auto filter where for the specified propertyName, returns null is there not not one set. |
|
AutoFilterWhereClause |
getAutoFilterWhere()
Get the current auto filter where clause object; not the string representation of it. |
|
java.lang.String |
getAutoFilterWhereClause()
Gets the current auto filter where clause, returns null is there not not one set. |
|
org.hibernate.metadata.ClassMetadata |
getBaseEntityMetadata()
|
|
int |
getBufferedRowCount()
Returns the number of rows in the current resultset. |
|
java.lang.String |
getCacheRegion()
|
|
TCEntity |
getCurrentEntity()
Gets the current entity from the resultset. |
|
org.hibernate.metadata.ClassMetadata |
getCurrentEntityMetadata()
Return the Hibernate metadata for the current entity if there is a current entity, otherwise, the metadata for the base entity used by the datasource |
|
java.lang.String |
getCurrentEntityName()
Returns the base entity name this data source represents. |
|
int |
getCurrentPageNo()
|
|
int |
getCurrentRowIndex()
Gets the current entity's index (0-based) in the resultset. |
|
java.util.List<TCEntity> |
getDeletedEntities()
|
|
org.hibernate.criterion.DetachedCriteria |
getDetatchedCriteria()
|
|
TCEntity |
getEntity(java.lang.String pkHexCode,
boolean makeCurrent)
Returns a TCEntity instance by PK HexCode, and optionally makes the returned entity current in the resultset. |
|
TCEntity |
getEntityById(java.lang.Object id)
Returns the entity for the specified id. |
|
TCEntity |
getEntityByRowId(java.lang.String pkHexCode)
Returns the entity for the specified tcEntity id. |
|
int |
getEntityIndex(TCEntity entity)
Returns the index of the specified entity. |
|
org.hibernate.metadata.ClassMetadata |
getEntityMetadata(java.lang.Class<? extends TCEntity> entityType)
|
|
org.hibernate.metadata.ClassMetadata |
getEntityMetadata(java.lang.String entityTypeClassName)
|
|
java.lang.String |
getEntityName()
Returns the base entity name this data source represents. |
|
java.lang.String |
getEntityShortName()
|
|
java.lang.String |
getHbn8CascadeRules()
|
|
java.lang.Object |
getId(TCEntity entity)
Returns the Hibernate ID Object for the specified entity. |
|
java.lang.String |
getInitialOrderByClause()
|
|
java.lang.String |
getInitialWhereClause()
|
|
long |
getLastAccessed()
|
|
int |
getMaxRows()
|
|
DataSourceMode |
getMode()
Gets the mode of the data source. |
|
Model |
getModel()
Returns the model object associated with this page's session. |
|
java.util.List<DataSourceEventListener> |
getMyEventListeners()
|
|
java.lang.String |
getName()
Gets the name of the data source. |
|
java.lang.String |
getOrderByClause()
Gets the initial orderByClause. |
|
java.lang.Integer |
getPageSize()
|
|
java.lang.String |
getParentAdderMethodName()
|
|
java.lang.String |
getParentCollectionName()
|
|
DataSource |
getParentDataSource()
Returns the parent data source, or null if there is no parent. |
|
java.lang.String |
getParentDataSourceName()
|
|
java.lang.String |
getParentPropertyName()
|
|
java.lang.String |
getParentRowPkHexCode()
|
|
java.lang.String |
getPKHexCode(TCEntity entity)
Returns a hex encoded value of the primary key. |
|
int |
getPreFetchedRowCount()
|
|
java.lang.String |
getProjectionProperties()
|
|
java.lang.String |
getPropertyType(java.lang.String propertyName)
|
|
org.apache.commons.beanutils.PropertyUtilsBean |
getPropertyUtilsBean()
|
|
java.lang.String |
getQBFFieldValue(java.lang.String propertyName)
Gets current QBF field value mapped to a specified field name. |
|
DataSourceQBFData |
getQBFFieldValues()
|
|
java.lang.String |
getQbfWhereClause()
|
|
IResultSetCollection<TCEntity> |
getResultSet()
Gets this data source's resultset. |
|
|
getResultSet(java.lang.Class<T> dest)
A somewhat uncool method for getting a typed collection |
|
int |
getRowCount()
Returns the number of rows in the current resultset. |
|
java.util.Set<java.lang.String> |
getSelectedRowIDs()
Returns the current list of selected row IDs. |
|
java.util.List<SortProperty> |
getSortedOnProperties()
|
|
java.lang.String |
getSortOrderByClause()
Gets the orderByClause used in the last sort action. |
|
long |
getTimeout()
|
|
int |
getTopRowIndexForCurrentRow(int size)
Gets the index in the resultset of the top tcEntity in a block of rows that contains the current entity. |
|
int |
getTotalPages()
|
|
java.util.Set<java.lang.Object> |
getUniquePropertyValues(java.lang.String propertyName,
java.lang.String expression)
Returns a SortedSet of all unique property values for the specified field for the entities in the current resultset that match the expression. |
|
java.lang.String |
getWhereClause()
Gets the initial Where clause of the data source. |
|
boolean |
getYesNoField(java.lang.String propertyName)
Gets the boolean value of the specified field in the result set's current entity. |
|
void |
handleDataSourceEvent(DataSourceEvent event)
A call-back method that is notified of a data source event. |
|
void |
init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope)
Initializes this data source. |
|
void |
init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope,
int maxRows,
boolean prefetchRowCount,
java.lang.Integer pageSize)
Initializes this data source. |
|
void |
init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope,
int maxRows,
java.lang.Integer pageSize)
Initializes this data source. |
|
TCEntity |
insert()
|
|
TCEntity |
insert(java.lang.Class<? extends TCEntity> newEntityType)
Inserts new entity into resultset (new entity becomes current). |
|
java.lang.Object |
instantiateNewEntityInstance(java.lang.Class<? extends TCEntity> newEntityType)
Create a new instance of the TCEntity managed by this data source |
|
boolean |
isApplicationScope()
|
|
boolean |
isCacheable()
|
|
boolean |
isCurrentRow()
Returns true if the entity is current. |
|
boolean |
isDirty()
Returns true if this data source is deemed to be in a dirty state of mind. |
|
boolean |
isEmpty()
Returns true if the current resultset is empty. |
|
boolean |
isExpired()
|
|
boolean |
isLargeResultSet()
Did the last query on this data source return a large resultset? |
|
boolean |
isPaginated()
|
|
boolean |
isReloadCollection()
|
|
boolean |
isRequestScope()
Returns true if the requestScope attribute is set. |
|
boolean |
isSelected()
Returns true if the row ID of the current entity in the resultset is in the list of selected row IDs. |
|
boolean |
isUsePrefetchRowCount()
|
|
TCEntity |
last()
Positions the resultset to last entity or block of rows. |
|
TCEntity |
next(int size)
Positions the resultset to next entity or block of rows. |
|
TCEntity |
previous(int size)
Positions the resultset to previous entity or block of rows. |
|
void |
refreshParentEntity()
Refreshes parent data source's current entity (if a parent data source instance exists). |
|
void |
reloadCurrentEntity()
Reloads the current entity from the DS using the Hibernate LockMode.READ |
|
void |
removeAutoFilterWhereClauseField(java.lang.String columName)
Removes a columnName from the autoFilter where clause |
|
boolean |
removeDataSourceEventListener(DataSourceEventListener listener)
Removes a DataSourceEventListener from
this data source. |
|
void |
removeQBFField(java.lang.String propertyName)
Removes the current QBF property value mapped to a specified property name. |
|
void |
reset()
Resets this data source to free up its resultset. |
|
java.lang.Object |
resolveProperty(java.lang.String name,
com.taggercat.el.ELContext elContext)
This is the call back method registered with the expression evaluator. |
|
void |
restoreRepeatingRegionTopRowIndex()
Restores the top tcEntity index in the ds after the repeating region is completed. |
|
void |
save()
Saves any changed entities back into a Hibernate session, and to the database. |
|
void |
saveWithoutNotification()
Saves this datasource without AFTER_SAVE parent notifications being issued. |
|
void |
setAppendQbfWhereClause(boolean appendQBFtoWhereClause)
Sets the state of the appendQBFtoWhereClause property. |
|
void |
setApplicationScope(boolean applicationScope)
|
|
void |
setAutoFilterWhere(AutoFilterWhereClause autoFilterWhereClause)
Sets a new auto filter where clause object; not the string representation. |
|
void |
setCacheable(boolean cacheable)
|
|
void |
setCacheRegion(java.lang.String cacheRegion)
|
|
TCEntity |
setCurrentEntity(int index)
Sets the current entity in the resultset by index. |
|
void |
setCurrentEntity(java.lang.String rowID)
Sets the current entity in the resultset based on the row ID. |
|
int |
setCurrentEntity(TCEntity entity)
Sets the current entity in the resultset. |
|
void |
setCurrentPageNo(int currentPageNo)
|
|
void |
setDirty(boolean dirty)
|
|
void |
setEmptyValuePolicy(int emptyValuePolicy)
Sets the policy of this data source for property values that have changed to an empty string from a non-empty value. |
|
void |
setHbn8CascadeRules(java.lang.String hbn8CascadeRules)
|
|
void |
setLastAccessed(long lastAccessed)
|
|
void |
setMaxRows(int maxRows)
|
|
void |
setMode(DataSourceMode mode)
Sets the mode of the data source. |
|
void |
setModel(Model model)
Sets the Model that owns this data source. |
|
void |
setModified()
Sets this data source as being modified ( AKA dirty); needs to be saved. |
|
void |
setPageSize(java.lang.Integer pageSize)
|
|
void |
setParentAdderMethodName(java.lang.String parentForeignKey)
|
|
void |
setParentCollectionName(java.lang.String parentCollectionName)
|
|
void |
setParentDataSource(DataSource parentDataSource)
Sets the parent data source |
|
void |
setParentModified()
Recursively call up the parent Hierarchy and set the modified property on parent entities. |
|
void |
setParentPropertyName(java.lang.String parentPropertyName)
|
|
void |
setParentRowPkHexCode(java.lang.String parentRowPkHexCode)
|
|
void |
setProjectionProperties(java.lang.String projectionProperties)
|
|
void |
setPropertyObject(TCEntity entity,
java.lang.String propertyName,
java.lang.Object propertyValue)
Sets a named property's value for a specified entity. |
|
boolean |
setPropertyValue(java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
Sets a named property value for current entity. |
|
boolean |
setPropertyValue(java.lang.String rowID,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
Sets a named property value for a entity specified with a row ID. |
|
boolean |
setPropertyValue(TCEntity entity,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
Sets a named property value for a specified entity. |
|
boolean |
setPropertyValue(TCEntity entity,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations,
boolean validateOnly,
java.lang.String sourceOfValuesExpr)
Sets a named property's value for a specified entity. |
|
void |
setQBFFields(java.util.Map<java.lang.String,java.lang.String> qbfFields,
java.lang.String wildCardChar)
Set the qbf fields map, and rebuilds the QBF where clause. |
|
void |
setQBFFieldValue(java.lang.String propertyName,
java.lang.String value)
Sets the current QBF field value mapped to a specified field name. |
|
void |
setReloadCollection(boolean reloadCollection)
|
|
TCEntity |
setRepeatingRegionProcessing(int size)
Sets the isRepeatedRegionProcessing indicator, and
the size of the sets the current tcEntity index for restoration after
the region has been processed. |
|
void |
setRetainSortOrder(boolean state)
Sets a property to retain the order by clause last used to sort the data source. |
|
void |
setSortedOnProperties(java.util.List<SortProperty> sortedOnProperties)
|
|
void |
setTimeout(long timeout)
Sets the timeout for this datasource to reset its result set |
|
void |
setTotalPages(int totalPages)
|
|
void |
setUsePrefetchRowCount(boolean usePrefetchRowCount)
|
|
void |
setWhereClause(java.lang.String where)
Sets the where clause. |
|
void |
sort(java.lang.String orderByTerm)
Sort the data source with the specified orderByTerm. |
|
java.lang.String |
toString()
|
|
void |
undo()
Undoes all pending changes on the current entity on the data source. |
|
boolean |
usePrefetchRowCount()
Returns true if the dataSource uses prefetchRowCounts. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataSource()
public DataSource(DataSourceInitParameter parameterObject)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void addDataSourceEventListener(DataSourceEventListener listener)
DataSourceEventListener to this
data source.
listener - DataSourceEventListener
instance.
public void addQBFParameter(java.lang.String propertyName,
java.lang.String propertyValue)
throws java.lang.Exception
java.lang.ExceptionpropertyName - name of property being setpropertyValue - the new value of propertypublic void addSelectedRowID(java.lang.String rowID)
rowID - row ID of entity instance.public TCEntity setRepeatingRegionProcessing(int size)
isRepeatedRegionProcessing indicator, and
the size of the sets the current tcEntity index for restoration after
the region has been processed.
size - Number of rows displayed.
public void clearAutoFilterWhereClause()
public void clearQBFWhereClause()
public void clearSelectedRowIDs()
public void delete()
throws java.lang.Exception
java.lang.Exception
public void deleteSelected()
throws java.lang.Exception
java.lang.Exceptionpublic void restoreRepeatingRegionTopRowIndex()
public void reset()
public void executeQuery()
throws java.lang.Exception
Executes the query on the data source.
The query is executed using the Criteria API, and also applies to child data sources represented by collections.
java.lang.Exception - thrown if query fails
public void buildDetachedCriteria(java.lang.String userWhereClause)
throws PropertyValueException
PropertyValueExceptionuserWhereClause -
public java.util.List<TCEntity> findAll(java.lang.String expression)
throws java.lang.Exception
java.lang.Exceptionexpression - the expression to evaluate
public java.util.List<TCEntity> findAll(IResultSetCollection resultset,
java.lang.String expression)
throws java.lang.Exception
java.lang.Exceptionexpression - the expression to evaluateresultset - the result set to search
public TCEntity findFirst(java.lang.String expression)
throws java.lang.Exception
java.lang.Exceptionexpression - the expression to evaluate
public TCEntity first()
throws java.lang.Exception
java.lang.Exception - ModelException
public TCEntity getCurrentEntity()
public int getCurrentRowIndex()
public DataSourceMode getMode()
public java.lang.String getName()
public java.lang.String getOrderByClause()
public java.lang.String getSortOrderByClause()
public void setParentDataSource(DataSource parentDataSource)
parentDataSource - the parentDataSource to setpublic DataSource getParentDataSource()
public org.hibernate.metadata.ClassMetadata getBaseEntityMetadata()
public org.hibernate.metadata.ClassMetadata getCurrentEntityMetadata()
public org.hibernate.metadata.ClassMetadata getEntityMetadata(java.lang.Class<? extends TCEntity> entityType)
public org.hibernate.metadata.ClassMetadata getEntityMetadata(java.lang.String entityTypeClassName)
public java.lang.String getPKHexCode(TCEntity entity)
entity - the entity to return the hex encoded PK
public java.lang.String getQBFFieldValue(java.lang.String propertyName)
propertyName - the name of QBF field
public void setQBFFieldValue(java.lang.String propertyName,
java.lang.String value)
propertyName - then name of QBF property.value - the value to setpublic void removeQBFField(java.lang.String propertyName)
propertyName - the name of QBF field to removepublic IResultSetCollection<TCEntity> getResultSet()
public TCEntity getEntity(java.lang.String pkHexCode,
boolean makeCurrent)
throws java.lang.Exception
java.lang.Exception - ModelExceptionpkHexCode - the row IDmakeCurrent - Set to true to make the returned entity current in the
resultset.
public int getRowCount()
public int getBufferedRowCount()
public java.lang.String getEntityName()
public java.lang.String getCurrentEntityName()
public TCEntity getEntityById(java.lang.Object id)
id -
public int getEntityIndex(TCEntity entity)
entity -
public TCEntity getEntityByRowId(java.lang.String pkHexCode)
pkHexCode -
public java.util.Set<java.lang.String> getSelectedRowIDs()
public java.util.List<SortProperty> getSortedOnProperties()
public void setSortedOnProperties(java.util.List<SortProperty> sortedOnProperties)
sortedOnProperties - the sortedOnProperties to setpublic int getTopRowIndexForCurrentRow(int size)
size - Number of rows displayed.
public java.lang.String getWhereClause()
public boolean getYesNoField(java.lang.String propertyName)
propertyName - the property name to get the value for
public void handleDataSourceEvent(DataSourceEvent event)
throws java.lang.Exception
handleDataSourceEvent in interface DataSourceEventListenerjava.lang.Exception - ModelExceptionevent - DataSourceEvent instance.public boolean isDirty()
public void init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope)
throws java.lang.Exception
java.lang.Exception - thrown if query execution failsmodel - The Model instance that owns this data source instance.dsn - data source name.entityName - the Hibernate (entity) nameinitialWhereClause - "WHERE" clause for query.initialOrderByClause - "ORDERBY" clause for query.mode - If equal to "qbf", the query is not executed during this method call
(used by QBF-style data sources to delay query execution).parentDataSourceName - Name of the parent data source (can be null for no parent).
public void init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope,
int maxRows,
java.lang.Integer pageSize)
throws java.lang.Exception
java.lang.Exception - thrown if query execution failsmodel - The Model instance that owns this data source instance.dsn - data source name.entityName - the Hibernate (entity) nameinitialWhereClause - "WHERE" clause for queryinitialOrderByClause - "ORDERBY" clause for querymode - If equal to "qbf", query is not executed during this method call
(used by QBF-style data sources to delay query execution).parentDataSourceName - the name of the parent data source (can be null for no parent)maxRows - the maximum Rows to read on the initial fetch.
public void init(Model model,
java.lang.String dsn,
java.lang.String entityName,
java.lang.String initialWhereClause,
java.lang.String initialOrderByClause,
DataSourceMode mode,
java.lang.String parentDataSourceName,
java.lang.String scope,
int maxRows,
boolean prefetchRowCount,
java.lang.Integer pageSize)
throws java.lang.Exception
java.lang.Exception - thrown if query execution failsmodel - The Model instance that owns this data source instance.dsn - data source name.entityName - the Hibernate entity nameinitialWhereClause - "WHERE" clause for query.initialOrderByClause - "ORDERBY" clause for query.mode - If equal to "qbf", the query is not executed during this method call
(used by QBF-style data sources to delay query execution).parentDataSourceName - Name of the parent data source (can be null for no parent).maxRows - the maximum Rows to read on the initial fetch.prefetchRowCount - set true to have the ds pre-fetch the entity count
public TCEntity insert()
throws java.lang.Exception
java.lang.Exception
public TCEntity insert(java.lang.Class<? extends TCEntity> newEntityType)
throws java.lang.Exception
java.lang.Exception - ModelException
public java.lang.Object instantiateNewEntityInstance(java.lang.Class<? extends TCEntity> newEntityType)
throws java.lang.Exception
TCEntity managed by this data source
java.lang.Exception
public boolean isCurrentRow()
entity is current.
public boolean isEmpty()
public boolean isLargeResultSet()
public boolean isRequestScope()
public boolean isSelected()
public TCEntity last()
throws java.lang.Exception
java.lang.Exception - ModelException
public TCEntity next(int size)
throws java.lang.Exception
java.lang.Exception - ModelExceptionsize - Number of rows displayed.
public TCEntity previous(int size)
throws java.lang.Exception
java.lang.Exception - ModelExceptionsize - the number of rows displayed
public void refreshParentEntity()
throws java.lang.Exception
java.lang.Exceptionpublic boolean removeDataSourceEventListener(DataSourceEventListener listener)
DataSourceEventListener from
this data source.
listener - DataSourceEventListener
instance.
public void save()
throws java.lang.Exception
save() method was called on.
java.lang.Exception
public void saveWithoutNotification()
throws java.lang.Exception,
ModelException
java.lang.Exception
ModelException
public void clearModfiedFlags()
throws java.lang.Exception
java.lang.Exceptionpublic void close()
public void setAppendQbfWhereClause(boolean appendQBFtoWhereClause)
appendQBFtoWhereClause - if true ( default ) QBF where clause is appended to the main
where clause.
public void setCurrentEntity(java.lang.String rowID)
throws java.lang.Exception
java.lang.Exception - ModelExceptionrowID - row ID of entity to make current.
public int setCurrentEntity(TCEntity entity)
throws java.lang.Exception
java.lang.Exception - ModelExceptionentity - the entity to make current
public TCEntity setCurrentEntity(int index)
throws java.lang.Exception
java.lang.Exceptionindex - the index of the entity to make current
public boolean setPropertyValue(java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
throws java.lang.IllegalArgumentException,
PropertyValueException
java.lang.IllegalArgumentException - Description of the Exception
PropertyValueExceptionpropertyName - name of property being setpropertyValue - the new value of propertyapplyDerivations - set true to immediately apply derivations
public boolean setPropertyValue(java.lang.String rowID,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
throws java.lang.Exception
java.lang.IllegalArgumentException - Description of the Exception
java.lang.ExceptionrowID - row ID.propertyName - name of property being setpropertyValue - the new value of propertyapplyDerivations - set true to immediately apply derivations
public boolean setPropertyValue(TCEntity entity,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations)
throws java.lang.IllegalArgumentException,
PropertyValueException
java.lang.IllegalArgumentException - Description of the Exception
PropertyValueExceptionentity - the TCEntity to update.propertyName - name of property being setpropertyValue - the new value of propertyapplyDerivations - set to true to immediately apply derivations
public boolean setPropertyValue(TCEntity entity,
java.lang.String propertyName,
java.lang.String propertyValue,
boolean applyDerivations,
boolean validateOnly,
java.lang.String sourceOfValuesExpr)
throws java.lang.IllegalArgumentException,
PropertyValueException
java.lang.IllegalArgumentException - Description of the Exception
PropertyValueExceptionentity - the TCEntity to update.propertyName - name of property being setpropertyValue - the new value of propertyapplyDerivations - set to true to immediately apply derivationsvalidateOnly - set to true to if this call is only used to apply validation constraintssourceOfValuesExpr - the EL expression where the source values can be looked up from, applies to association and
property references
public java.lang.String applyProfanityFilter(java.lang.String strValue)
public void checkPropertyConstraints(TCEntity entity,
java.lang.String propertyName,
com.taggercat.el.ELContext elContext,
boolean validateOnly)
throws PropertyValueException
PropertyValueExceptionentity - the entity to checkpropertyName - the property name being checkedelContext - additional values for the expression evaluator - including new
value, old value, and target entityvalidateOnly - is this call only to validate the value when in an Ajax validation cycle
public void assignDerivations(TCEntity entity,
com.taggercat.el.ELContext elContext)
throws PropertyValueException
PropertyValueException
public void checkEntityConstraints(TCEntity entity,
java.util.Map<java.lang.String,java.lang.Boolean> additionalContextParms)
throws java.lang.Exception
java.lang.Exceptionentity - the entity to checkadditionalContextParms - any additional context parameters
public void setPropertyObject(TCEntity entity,
java.lang.String propertyName,
java.lang.Object propertyValue)
throws java.lang.IllegalArgumentException,
PropertyValueException
java.lang.IllegalArgumentException - Description of the Exception
PropertyValueExceptionentity - the TCEntity to update.propertyName - the property name being setpropertyValue - the property value being setpublic java.lang.String getPropertyType(java.lang.String propertyName)
public java.util.Set<java.lang.Object> getUniquePropertyValues(java.lang.String propertyName,
java.lang.String expression)
throws java.lang.Exception
java.lang.Exceptionexpression - the expression to evaluate
public void setMode(DataSourceMode mode)
mode - the mode for the dspublic void setModel(Model model)
Model that owns this data source.
model - the modelpublic void setWhereClause(java.lang.String where)
where - the new initial where clausepublic void setRetainSortOrder(boolean state)
state - set true to have the sort order of the last sort action used for
subsequent queries.
public void sort(java.lang.String orderByTerm)
throws java.lang.Exception
java.lang.ExceptionorderByTerm - the new orderByClause
public void addSortOrderTerm(java.lang.String orderByTerm)
throws java.lang.Exception
java.lang.ExceptionorderByTerm -
public void reloadCurrentEntity()
throws java.lang.Exception
java.lang.Exception
public void undo()
throws java.lang.Exception
java.lang.Exception - ModelExceptionpublic boolean usePrefetchRowCount()
public Model getModel()
public void addAutoFilterWhereClauseField(java.lang.String columName,
java.lang.String[] values)
columName - the column name to addvalues - the values for this columnpublic void removeAutoFilterWhereClauseField(java.lang.String columName)
columName - public java.lang.String getAutoFilterWhereClause()
public java.lang.String getAutoFilterField(java.lang.String propertyName)
public java.lang.Object resolveProperty(java.lang.String name,
com.taggercat.el.ELContext elContext)
throws java.lang.IllegalArgumentException
customer.Name request.orderDate session.user page.isValidThe attribute on the scope variables may have been added with the TCSet, TCOut etc. tags or with any other means.
resolveProperty in interface com.taggercat.el.ELPropertyResolverjava.lang.IllegalArgumentExceptionname - the dot delimited name of the term to resolve, eg, customer.NameelContext - the context values
public void setQBFFields(java.util.Map<java.lang.String,java.lang.String> qbfFields,
java.lang.String wildCardChar)
throws java.lang.Exception
java.lang.ExceptionqbfFields - the new qbfFieldswildCardChar - the wildCardChar if anypublic void setAutoFilterWhere(AutoFilterWhereClause autoFilterWhereClause)
autoFilterWhereClause - public AutoFilterWhereClause getAutoFilterWhere()
public int getMaxRows()
public void setMaxRows(int maxRows)
maxRows - The maxRows to set.public java.util.List<DataSourceEventListener> getMyEventListeners()
public java.lang.String getInitialOrderByClause()
public java.lang.Object getId(TCEntity entity)
entity -
public java.lang.String getInitialWhereClause()
public int getPreFetchedRowCount()
public DataSourceQBFData getQBFFieldValues()
public void setEmptyValuePolicy(int emptyValuePolicy)
emptyValuePolicy - public java.lang.String getQbfWhereClause()
public java.lang.String getParentCollectionName()
public void setParentCollectionName(java.lang.String parentCollectionName)
parentCollectionName - The parentCollectionName to set.public void setParentModified()
public java.lang.String getParentAdderMethodName()
public void setParentAdderMethodName(java.lang.String parentForeignKey)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getProjectionProperties()
public void setProjectionProperties(java.lang.String projectionProperties)
public org.apache.commons.beanutils.PropertyUtilsBean getPropertyUtilsBean()
public boolean isPaginated()
public void setDirty(boolean dirty)
dirty - the dirty state to setpublic void setModified()
public java.lang.String getParentPropertyName()
public void setParentPropertyName(java.lang.String parentPropertyName)
public java.lang.String getHbn8CascadeRules()
public void setHbn8CascadeRules(java.lang.String hbn8CascadeRules)
public java.lang.String getParentRowPkHexCode()
public void setParentRowPkHexCode(java.lang.String parentRowPkHexCode)
public boolean isApplicationScope()
public void setApplicationScope(boolean applicationScope)
public org.hibernate.criterion.DetachedCriteria getDetatchedCriteria()
public java.lang.String getParentDataSourceName()
public java.util.List<TCEntity> getDeletedEntities()
public java.lang.String getEntityShortName()
public boolean isCacheable()
public void setCacheable(boolean cacheable)
public java.lang.String getCacheRegion()
public void setCacheRegion(java.lang.String cacheRegion)
public boolean isUsePrefetchRowCount()
public void setUsePrefetchRowCount(boolean usePrefetchRowCount)
usePrefetchRowCount - the usePrefetchRowCount to setpublic long getTimeout()
public void setTimeout(long timeout)
timeout - the timeout to set in Seconds; set to 0 to never expirepublic long getLastAccessed()
public void setLastAccessed(long lastAccessed)
lastAccessed - the lastAccessed to setpublic boolean isExpired()
public java.lang.Integer getPageSize()
public void setPageSize(java.lang.Integer pageSize)
public int getTotalPages()
public void setTotalPages(int totalPages)
public int getCurrentPageNo()
public void setCurrentPageNo(int currentPageNo)
public boolean isReloadCollection()
public void setReloadCollection(boolean reloadCollection)
public <T> java.util.Collection<T> getResultSet(java.lang.Class<T> dest)
T - the type to cast the collection intodest - the type to convert the collection into
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||