public abstract class CacheTableEntity extends TableEntity
SearchValue.
Title:
Description:
Copyright: Copyright (c) 2003
Company:
TableEntity.AttachmentReceiving, TableEntity.FileInfo, TableEntity.FileInfoList, TableEntity.Receiving| Modifier and Type | Field and Description |
|---|---|
protected EntityResult |
data |
alias, aliasPropertiesParser, aliasReverse, ASTERISK, ATTACHMENT_FILE_DESCRIPTION_COLUMN, ATTACHMENT_FILE_NAME_COLUMN, ATTACHMENT_FILE_NAME_KEYS, ATTACHMENT_FILE_ORIGINAL_NAME_COLUMN, ATTACHMENT_FILE_ORIGINAL_PATH_COLUMN, ATTACHMENT_FILE_PATH, ATTACHMENT_FILE_SIZE_COLUMN, ATTACHMENT_SEPARATOR, ATTACHMENT_TABLE, attachmentFileNameColumn, attachmentFileNameKeys, attachmentFilePath, attachmentFileSizeColumn, attachTable, auditorLog, AUTOCONFIGURATION, AUTONUMERICAL, autonumericalColumn, calendar, checkOperationResult, columnNames, COLUMNS, connectionRequestTime, COUNT_COLUMNS, countColumns, dataChangeListeners, dBLocalErrorMessage, defaultEntityScriptManagerClassName, DELETE_ACTION, DELETE_KEYS, deleteKeys, descendantColumnsOrder, descriptionAttachmentFileColumn, enableScripting, entitiesPropertiesParser, entitiesTableAttribute, entityName, entityScripting, FETCH_SIZE, fetchSize, FILE_COLUMNS, fileInfoList, FORCE_DISTINCT, forceDistinct, GENERATED_KEY, generatedKeyList, hOtherLocaleTablesColumns, hOtherLocaleTablesKey, INSERT_ACTION, INSERT_AUTOMATICLY_ATTACHMENT, INSERT_COLUMNS, INSERT_KEYS, insertAttachmentAutomatically, insertColumn, insertKeys, INTERROG, keys, KEYS, LIMIT_QUERY_OTHERS_ENTITIES, limitQueryOthersEntities, LOCALE_COLUMNS, LOCALE_TABLE, localeTable, locator, LOG_KEYS, logDelete, logInsert, logkeys, logQuery, logUpdate, M_ERROR_OPERATION, M_IT_HAS_NOT_CHANGED_ANY_RECORD, M_LICENSE_PERMISSION_ERROR, M_TEMPORALY_RESTRICTED_BY_PERMISSION_ACTION, M_YOU_DO_NOT_HAVE_PERMISSION_TO_EXECUTE_ACTION, manager, maxConnectionWaitTime, oneToOneMode, orderColumns, originalAttachmentFileNameColumn, originalAttachmentFilePathColumn, OTHER_ENTITIES, OTHER_LOCALE_TABLES, OTHER_LOCALE_TABLES_COLUMNS, OTHER_LOCALE_TABLES_KEY, othersEntities, PERCENT, PRINCIPAL_COLUMNS, PRINCIPAL_KEYS, PRINCIPAL_TABLE, principalColumnNames, principalKeyName, principalTable, privilegedId, properties, propertiesPath, QUERY_ACTION, QUERY_TABLE, queryTable, receivedAttachmentFile, receivedTempFiles, RECORD_OPERATIONS, registeredDispatcher, REPORT_ADVANCED_QUERY_COLUMNS, REPORT_ADVANCED_QUERY_TYPES, reportAvancedQueryColumns, reportAvancedQueryTypes, SECONDARY_COLUMNS, SECONDARY_KEYS, SECONDARY_TABLE, secondaryColumnsNames, secondaryKeyName, secondaryTable, sendAttachmentFile, SORT, SORT_DESC, table, TABLE, TABLE_ATTRIBUTE_ENTITIES, tempFiles, TRUNCATE_DATE_DEFAULT_VALUE, TRUNCATE_DATES, truncateDates, UNDERSCORE, UPDATE_ACTION, UPDATE_COLUMNS, UPDATE_KEYS, updateColumn, updateKeys, USE_SETSTRING_LONG_STRINGS, useAlwaysTableAttributeEntities, vLocaleColumns, vOtherLocaleTables, WILDCARD_COLUMNS, wildcardColumnsref| Constructor and Description |
|---|
CacheTableEntity(EntityReferenceLocator referenceLocator,
DatabaseConnectionManager connectionManager,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
dataDeleted(Hashtable kv) |
protected abstract void |
dataInserted(Hashtable av) |
protected abstract void |
dataUpdated(Hashtable kv) |
EntityResult |
delete(Hashtable keys,
int sessionId)
This method must implement a standard delete operation over the set of
records defined by
keysValues. |
protected void |
initData() |
EntityResult |
insert(Hashtable values,
int sessionId)
This method implements a standard database insert operation with the data
contained in
attributesValues parameter. |
EntityResult |
query(Hashtable keysValues,
Vector attributes,
int sessionId)
This method implements a standard query operation returning the set of
data that matches the conditions specified by the
keysValues
parameter. |
AdvancedEntityResult |
query(Hashtable keysValues,
Vector attributes,
int currentIndex,
int number,
String orderBy,
int sessionId) |
EntityResult |
update(Hashtable values,
Hashtable keys,
int sessionId)
This method implements a standard update operation with the data
specified in
attributesValues over the set of records
defined by keysValues. |
addEntityDataChangeListener, buildConditionsString, cancelReceiving, checkAmbiguousColumns, checkAvailableLocaleTables, checkBasicExpresionLocalesInKv, checkBasicExpresionLocalesInKv, checkConditionsWithTablePreffix, checkDeleteKeys, checkFinishedSession, checkInsertKeys, checkLocalesInKV, checkOrderColumns, checkOtherLocaleTables, checkPermissions, checkUpdateKeys, configureReverseAlias, connect, connect, createAdvancedEntityResultForSessionId, createAdvancedEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityResultForSessionId, createEntityScriptManager, delete, deleteAttachmentFile, deleteAttachmentFile, deleteHOtherLocaleTablesAlias, deleteLocaleColumns, deleteMultipleTableAttributesColumns, disconnect, disconnect, dispatcherAttribute, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executePreparedStatement, executeStatement, filterAttributes, filterKeys, finishReceiving, fireDataChangeEvent, fireDataChangeEvent, fireTransactionDataChangeEvent, fireTransactionDataChangeEvent, generatedKeysToEntityResult, generateRandomId, getActions, getAliasForColumn, getAttachmentFileNameForKeys, getAttachmentFilePath, getAttachmentFilePath, getAutonumericalColumn, getBaseEntityName, getBytes, getColumnForAlias, getColumnListForAvancedQuery, getColumns, getColumnsWithoutLocale, getConditionsWithTablePreffix, getContidionsWithoutFilterKeys, getDatabaseConnectionManager, getDeleteKeys, getDescOrderColumns, getDescription, getEntityPrivilegedId, getEntityReference, getErrorMessage, getExtendedAliasPropertiesName, getExtendedPropertiesName, getExtension, gethOtherLocaleTablesColumns, getInsertKeys, getJoinConditions, getKeys, getKeysVector, getLocaleColumnsFromTable, getLocaleIdFromSession, getLocaleTableName, getLocaleTableName, getMetadata, getName, getOrderColumns, getPrivilegedId, getPropertiesPath, getQueryRecordNumber, getQueryRecordNumber, getQueryTable, getSchemaQueryTable, getSchemaTable, getSecondaryColumnsWithoutKey, getSize, getSQLTypesFromMetaData, getStringsOn, getSubGroupValues, getSubGroupValues, getTable, getTypeFromMetadata, getUpdateColumns, getUpdateKeys, getUser, getValidAttributes, getValidDeletingKeysValues, getValidInsertingAttributesValues, getValidQueryingKeysValues, getValidUpdatingAttributesValues, getValidUpdatingKeysValues, getvLocaleColumns, getWildCardColumns, insert, insertAutonumericalAlias, insertInLocaleTableLocaleColumns, insertInLocaleTablesForOneToOne, insertLocaleColumn, insertOtherEntities, isBinaryType, loadAliasFile, loadAliasFile, logToLogKeys, logUpdate, modifyBexpWithOtherLocaleTableAlias, modifyBexpWithOtherLocaleTableAlias, parseProperties, parseStringValue, particularizeConditions, performExtendedAliasProperties, performExtendedProperties, postDelete, postInsert, postUpdate, preDelete, preInsert, prepareToReceive, prepareToReceive, prepareToReceive, prepareToTransfer, prepareToTransfer, preUpdate, processColumnsWithoutLocale, processFileColumnsAttributes, processFileColumnsAttributes, processFileResults, processingMultipleValueAttributes, processingReferenceDataFieldAttributes, processingReferenceDataFieldAttributes, processMultipleAttributeKey, processMultipleTableAttribute, processMultipleTableAttribute, processOtherEntities, processValidLocaleColumnsValues, putBytes, query, query, query, query, queryOtherEntities, readProperties, readProperties, readProperties, registerAttributeDispatcher, reloadScripts, removeEntityDataChangeListener, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceAliasByColumn, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAlias, replaceColumnByAliasKeepColumns, resultSetToEntityResult, resultSetToEntityResult, resultSetToEntityResult, retrieveDataToInsert, setLimitQueryOthersEntities, setName, setObject, setObject, setPrivilegedId, tagAttributes, tagAttributesWithoutAlias, tagKeysValues, toVectorOfBooleans, truncateDataToHour_00_00_00, truncateDateToMinutes, update, updateAttachmentValues, updateInLocaleTablesForOneToOne, updateLocaleColumns, vectorToStringSeparateBySemicolonclone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogprotected EntityResult data
public CacheTableEntity(EntityReferenceLocator referenceLocator, DatabaseConnectionManager connectionManager, int port) throws Exception
Exceptionprotected void initData()
public AdvancedEntityResult query(Hashtable keysValues, Vector attributes, int currentIndex, int number, String orderBy, int sessionId) throws Exception
Exceptionpublic EntityResult query(Hashtable keysValues, Vector attributes, int sessionId) throws Exception
TableEntitykeysValues
parameter. The attributes defines which attributes (or
columns if data is obtained from a database) must be recovered, and
keysValues specifies which set of records must be recovered.
This entity maps a table in the database, so all the hashtable keys must correspond to table columns, generally using column names as strings, but also other objects are processed.
This method ask for a connection and calls the following methods:
#processMultipleTableAttribute(Vector)TableEntity.processMultipleAttributeKey(Vector)TableEntity.query(Hashtable , Vector , int , Connection)
Then, if the result returned by query has no error, the
TableEntity.queryOtherEntities(Vector , EntityResult , int ) method is
called.
After that, this entity logs the operation if logQuery is
true.
If an SQLException is thrown, the TableEntity.getErrorMessage(SQLException)
method is called and the resulting messsage is set as the message in the
EntityResult returned by this entity.
The result returned by TableEntity.query(Hashtable , Vector , int , Connection)
method is returned by this method if no error ocurrs.
query in interface Entityquery in class TableEntitykeysValues - a Hashtable specifying conditions that must comply the set of
records returned. Cannot be null.attributes - a list of columns that must be recovered for each record
returned. Cannot be null. If empty, all attributes will be
returned.sessionId - a integer identifying the user or session that performs the
action.Exception - if any non handled exception occursTableEntity.query(Hashtable, Vector, int, Connection)public EntityResult insert(Hashtable values, int sessionId) throws Exception
TableEntityattributesValues parameter.This entity maps a table in the database, so all the hashtable keys must correspond to table columns, generally using column names as strings, but also other objects are processed.
This method ask for a connection, set autocommit to false, so operations are processed in a transaction, and calls the following methods:
After this, commit is executed and if no error is produced a DataChangeEvent.INSERT_EVENT is thrown.
If an SQLException is thrown, the TableEntity.getErrorMessage(SQLException)
method is called and the resulting message is set as the message in the
EntityResult returned by this entity.
The result returned by TableEntity.insert(Hashtable , int , Connection)
method is returned by this method if no error occurs.
If an autonumerical is defined for this entity and no error occurs, the value used in the insert operation is returned in the result as a pair or key-value where key is the column name, and value is the value used in the insert operation.
insert in interface Entityinsert in class TableEntityvalues - a Hashtable specifying pairs of key-value corresponding to the
attribute (or column of a table in a database) and the value
that must be stored.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursTableEntity.insert(Hashtable , int , Connection)public EntityResult update(Hashtable values, Hashtable keys, int sessionId) throws Exception
TableEntityattributesValues over the set of records
defined by keysValues. So, only the records that comply with
the conditions specified by keysValues will be updated to
the new values specified by attributesValues.
This entity maps a table in the database, so all the hashtable keys must correspond to table columns, generally using column names as strings, but also other objects are processed.
This method ask for a connection, set autocommit to false, so operations are processed in a transaction, and calls the following methods:
After this, commit is executed and if no error is produced a DataChangeEvent.UPDATE_EVENT is thrown.
If an SQLException is thrown, the TableEntity.getErrorMessage(SQLException)
method is called and the resulting message is set as the message in the
EntityResult returned by this entity.
update in interface Entityupdate in class TableEntityvalues - the data for updating the records to. The keys specify the
attributes (or columns) and the values, the values for these
columns.keys - the conditions that the records to be updated must fulfill.
The keys specify the attributes (or columns) and the values,
the values for these columns.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursTableEntity.update(Hashtable, Hashtable , int , Connection)public EntityResult delete(Hashtable keys, int sessionId) throws Exception
TableEntitykeysValues. So, only the records that
comply with the conditions specified by keysValues will be
deleted.
This entity maps a table in the database, so all the hashtable keys must correspond to table columns, generally using column names as strings, but also other objects are processed.
This method ask for a connection, set autocommit to false, so operations are processed in a transaction, and calls the following methods:
After this, commit is executed and if no error is produced a DataChangeEvent.DELETE_EVENT is thrown.
If an SQLException is thrown, the TableEntity.getErrorMessage(SQLException)
method is called and the resulting message is set as the message in the
EntityResult returned by this entity.
delete in interface Entitydelete in class TableEntitykeys - the conditions that the records to be deleted must fulfill.
The keys specify the attributes (or columns) and the values,
the values for these columns.sessionId - a integer identifying the user or session that performs the
action.Exception - if any exception occursTableEntity.delete(Hashtable, int , Connection)protected abstract void dataDeleted(Hashtable kv)
protected abstract void dataUpdated(Hashtable kv)
protected abstract void dataInserted(Hashtable av)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.