|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.db.MemoryEntity
Implements an entity that execute all operations in the machine memory. This class must no be used in remote way
Title:
Description:
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
protected java.util.Properties |
alias
|
protected java.lang.String |
autonumericalColumn
|
protected java.util.Vector |
columnNames
|
protected EntityResult |
data
|
static boolean |
DEBUG
|
protected java.util.Vector |
deleteKeys
|
protected java.util.Vector |
descSortColumns
|
protected java.lang.String |
entityName
|
protected java.util.Vector |
insertColumns
|
protected java.util.Vector |
insertKeys
|
protected java.util.Vector |
keys
|
protected EntityReferenceLocator |
locator
|
protected java.util.Vector |
otherEntities
|
protected int |
privilegedId
|
protected int |
queryOtherEntitiesLimit
|
protected java.util.Hashtable |
reverseAlias
|
protected java.util.Vector |
sortColumns
|
protected java.util.Vector |
updateColumns
|
protected java.util.Vector |
updateKeys
|
protected java.util.Vector |
wildcardColumns
|
| Constructor Summary | |
MemoryEntity(EntityReferenceLocator referenceLocator)
|
|
| Method Summary | |
void |
checkDeleteKeys(java.util.Hashtable filterKeys)
|
void |
checkInsertKeys(java.util.Hashtable attributesValues)
|
void |
checkUpdateKeys(java.util.Hashtable filterKeys)
|
EntityResult |
delete(java.util.Hashtable keys,
int sessionId)
This method must implement a standard delete operation over the set of records defined by keysValues. |
java.lang.String |
getAliasForColumn(java.lang.String columnName)
|
java.lang.String |
getColumnForAlias(java.lang.String alias)
|
java.util.Vector |
getValidAttributes(java.util.Vector attributes)
|
java.util.Hashtable |
getValidDeletingKeysValues(java.util.Hashtable filterKeys)
|
java.util.Hashtable |
getValidInsertingAttributesValues(java.util.Hashtable attributesValues)
|
java.util.Hashtable |
getValidQueryingKeysValues(java.util.Hashtable filterKeys)
|
java.util.Hashtable |
getValidUpdatingAttributesValues(java.util.Hashtable attributesValues)
|
java.util.Hashtable |
getValidUpdatingKeysValues(java.util.Hashtable filterKeys)
|
EntityResult |
insert(java.util.Hashtable attributes,
int sessionId)
This method must implement a standard insert operation with the data contained in attributesValues parameter. |
protected void |
loadAliasFile()
Read the alias property file. |
static java.util.Hashtable |
processReferenceDataFieldAttributes(java.util.Hashtable kv)
Process the reference data field attributes ( ReferenceFieldAttribute). |
static java.util.Vector |
processReferenceDataFieldAttributes(java.util.Vector referenceDataFieldAttributes)
Process the ReferenceFieldAttribute objects. |
EntityResult |
query(java.util.Hashtable keys,
java.util.Vector attributes,
int sessionId)
This method must implement a standard query operation returning the set of data that matches the conditions specified by the keysValues parameter. |
AdvancedEntityResult |
query(java.util.Hashtable keys,
java.util.Vector attributes,
int startIndex,
int number,
java.lang.String orderBy,
int sessionId)
|
void |
readProperties()
Reads the property file associated to the entity. |
protected void |
readProperties(java.lang.String path)
|
EntityResult |
replaceAliasByColumn(EntityResult res)
This method replaces the name of the database columns with the correspondant alias, so that the result has the same names to those queried by the client. |
java.util.Hashtable |
replaceAliasByColumn(java.util.Hashtable hash)
|
java.util.Vector |
replaceAliasByColumn(java.util.Vector vect,
java.util.Vector changedColumns)
|
EntityResult |
replaceColumnByAlias(EntityResult res,
java.util.Vector replacedColumnNames)
|
java.util.Hashtable |
replaceColumnByAlias(java.util.Hashtable hash)
|
java.util.Vector |
replaceColumnByAlias(java.util.Vector vect)
|
EntityResult |
replaceColumnByAliasKeepColumns(EntityResult res)
|
EntityResult |
update(java.util.Hashtable attributes,
java.util.Hashtable keys,
int sessionId)
This method must implement a standard update operation with the data specified in attributesValues over the set
of records defined by keysValues. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean DEBUG
protected EntityResult data
protected java.util.Vector columnNames
protected java.util.Vector keys
protected java.util.Vector insertKeys
protected java.util.Vector deleteKeys
protected java.util.Vector updateKeys
protected java.util.Vector updateColumns
protected java.lang.String autonumericalColumn
protected java.util.Vector insertColumns
protected java.util.Vector wildcardColumns
protected java.util.Vector sortColumns
protected java.util.Vector descSortColumns
protected java.util.Vector otherEntities
protected EntityReferenceLocator locator
protected int queryOtherEntitiesLimit
protected java.util.Properties alias
protected java.util.Hashtable reverseAlias
protected java.lang.String entityName
protected int privilegedId
| Constructor Detail |
public MemoryEntity(EntityReferenceLocator referenceLocator)
throws java.lang.Exception
| Method Detail |
protected void loadAliasFile()
public void readProperties()
throws java.lang.Exception
java.lang.Exception
protected void readProperties(java.lang.String path)
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Hashtable processReferenceDataFieldAttributes(java.util.Hashtable kv)
ReferenceFieldAttribute).
kv -
ReferenceFieldAttribute.getAttr()
public void checkInsertKeys(java.util.Hashtable attributesValues)
throws java.lang.Exception
java.lang.Exception
public void checkUpdateKeys(java.util.Hashtable filterKeys)
throws java.lang.Exception
java.lang.Exception
public void checkDeleteKeys(java.util.Hashtable filterKeys)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getAliasForColumn(java.lang.String columnName)
public java.lang.String getColumnForAlias(java.lang.String alias)
public java.util.Hashtable replaceAliasByColumn(java.util.Hashtable hash)
public java.util.Hashtable replaceColumnByAlias(java.util.Hashtable hash)
public EntityResult replaceAliasByColumn(EntityResult res)
res -
public EntityResult replaceColumnByAlias(EntityResult res,
java.util.Vector replacedColumnNames)
public EntityResult replaceColumnByAliasKeepColumns(EntityResult res)
public java.util.Vector replaceAliasByColumn(java.util.Vector vect,
java.util.Vector changedColumns)
public java.util.Vector replaceColumnByAlias(java.util.Vector vect)
public java.util.Vector getValidAttributes(java.util.Vector attributes)
public java.util.Hashtable getValidQueryingKeysValues(java.util.Hashtable filterKeys)
public java.util.Hashtable getValidInsertingAttributesValues(java.util.Hashtable attributesValues)
public java.util.Hashtable getValidUpdatingAttributesValues(java.util.Hashtable attributesValues)
public java.util.Hashtable getValidUpdatingKeysValues(java.util.Hashtable filterKeys)
public java.util.Hashtable getValidDeletingKeysValues(java.util.Hashtable filterKeys)
public static java.util.Vector processReferenceDataFieldAttributes(java.util.Vector referenceDataFieldAttributes)
ReferenceFieldAttribute.getAttr() for all object of
ReferenceFieldAttribute type.
referenceDataFieldAttributes -
public AdvancedEntityResult query(java.util.Hashtable keys,
java.util.Vector attributes,
int startIndex,
int number,
java.lang.String orderBy,
int sessionId)
throws java.lang.Exception
java.lang.Exception
public EntityResult query(java.util.Hashtable keys,
java.util.Vector attributes,
int sessionId)
throws java.lang.Exception
EntitykeysValues 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.
query in interface Entitykeys - a Hashtable specifying conditions that must comply the set of records returned. Cannot be null.attributes - a list of columns or attributes that must be recovered for each record returned. Cannot be null. If empty, all attributes should be returned.sessionId - a integer identifying the user or session that performs the action.
java.lang.Exception - if any exception occurs
public EntityResult insert(java.util.Hashtable attributes,
int sessionId)
throws java.lang.Exception
EntityattributesValues parameter.
insert in interface Entityattributes - 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.
java.lang.Exception - if any exception occurs
public EntityResult update(java.util.Hashtable attributes,
java.util.Hashtable keys,
int sessionId)
throws java.lang.Exception
EntityattributesValues 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.
update in interface Entityattributes - 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.
java.lang.Exception - if any exception occurs
public EntityResult delete(java.util.Hashtable keys,
int sessionId)
throws java.lang.Exception
EntitykeysValues. So, only the records that comply with the conditions specified by keysValues
will be deleted.
delete in interface Entitykeys - 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.
java.lang.Exception - if any exception occurs
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||