|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.ontimize.db.TableEntity
com.ontimize.db.DefaultTableEntity
| Nested Class Summary |
| Nested classes inherited from class com.ontimize.db.TableEntity |
TableEntity.AttachmentReceiving, TableEntity.Receiving |
| Field Summary | |
protected java.lang.String |
props
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
DefaultTableEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbConnectionManager,
int port,
java.util.Properties prop,
java.util.Properties aliasProp)
|
|
DefaultTableEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbManager,
int port,
java.lang.String properties)
|
|
| Method Summary | |
protected java.lang.String |
getExtendedAliasPropertiesName()
Gets the extended alias property file path. |
protected java.lang.String |
getExtendedPropertiesName()
Gets the extended property file path. |
void |
loadAliasFile()
Loads the alias properties. |
void |
readProperties()
Loads the properties file for this entity. |
void |
setName(java.lang.String name)
|
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String props
| Constructor Detail |
public DefaultTableEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbManager,
int port,
java.lang.String properties)
throws java.lang.Exception
public DefaultTableEntity(EntityReferenceLocator locator,
DatabaseConnectionManager dbConnectionManager,
int port,
java.util.Properties prop,
java.util.Properties aliasProp)
throws java.lang.Exception
| Method Detail |
public void readProperties()
throws java.lang.Exception
TableEntitypropertiesPath (by default 'prop') relative to this entity's
class file, and named entityName.properties.
All the names specified in this file are considered database table columns, that is, should match exactly (case-sensitive) the columns of the database table/view.
The following table shows the parameters that can be defined in the properties file. For all parameters that define a list, the ';' character is used as separator.
| Parameter | Meaning | Required |
| Table | The database table name that this entity uses for query, insert, update, delete operations | yes |
| QueryTable | The database table or view name that this entity uses for query operations | no |
| Columns | Columns of the table specified in table parameter.
Tipically it should be exactly all the table columns, but this is not
strictly neccessary. These colums can be used in query, update, delete and
insert operations (unless insert_columns parameter is
defined) |
yes |
| InsertColumns | Columns allowed in insert, update, delete operations. If not defined,
columns is used instead |
no |
| Keys | Columns that make the primary key for this entity. Usually matches the table primary key. | yes |
| InsertKeys | Columns required (non null) in insert operations. | no |
| UpdateKeys | Columns required in keysvalues (update method parameter). These
columns, and only these, will be used in the WHERE clause of UPDATE SQL
sentences. If not specified, keys is used. |
no |
| DeleteKeys | Columns required in keysvalues (delete method parameter). These
columns, and only these, will be used in the WHERE clause of DELETE SQL
sentences. If not specified, keys is used. |
|
| UpdateColumns | Columns that can be modified by update operations, calling
update method. If not specified, no columns can be modified. |
no |
| Autonumerical | Column that stores an integer generated by Autonumerical object when
insert operations are performed. This column should never be specified in
insert_keys parameter as is not provided to the method insert
but is generated internally in the method. |
no |
| WildcardColumns | Columns in whick special search characters are allowed for LIKE queries. If not specified, all columns are allowed. | no |
| OtherEntities | Entities (by name) that will be queried for data related with records of this entity, when specified in attribute list. If not specified, all entities will be queried. | no |
| LimitQueryOtherEntities | If there are multiple results for this entity, and other entity data is asked, then this entity will limit the number of records for which other entities are queried to this parameter. By default this value is 100 | no |
| Sort | List of column names to use in the ORDER BY clause, in the same order
as they appear in this parameter. Since 5.2056EN-0.2, for specifying ascendant (ASC) and descendant (DESC) order individually for each column
is accepted the syntax:
ASC[col1];DESC[col2];...;ASC[coln] |
no |
Deprecated since 5.2056EN-0.2 (See Sort). sort and
sort_desc are specified, sort is used |
no | |
| FetchSize | The JDBC statement fetch size. By default this value is 0 | no |
| LogKeys | Specifies the keys for logging in this entity. These keys will be used for calling LogManager.getLogWriter(key) and then use resulting LogWriter for logging update, query, insert and delete operations | no |
| FileColumns | Specifies a list of columns for storing filename and file contents
pairs, that this entity receives as com.ontimize.gui.DataFile objects. This parameter is specified as a list of: attribute associated to file+':'+filename column+':'+file contents column, for each file to be stored. e.g, your form contains two FileDataField with attr file1 and file2 and columns in database to store content for these ones are filecolumn1 and filecolumn2 and columns to store names are filenamecolumn1 and filenamecolumn2. So, configuration for this parameter would be: FileColumns=file1:filenamecolumn1:filecolumn1;file2:filenamecolumn2:filecolumn2 |
no |
| ForceDistinct | If this parameter is 'yes', then a DISTINCT keyword will be used in all queries performed by this entity. By default this value is 'no' | no |
| TruncateDates | If this value is 'yes' then the java.util.Date values will be set to 00:00:00 before being set in the statements. By default this value is 'no'. Default value can be configured with TRUNCATE_DATE_DEFAULT_VALUE field | no |
| AttachmentFilePath | Path in the file system in which the attached files for this entity will be stored. If this parameter is specified, then the parameter 'AttachmentFileNameColumn' also must be specified | no |
| AttachmentFileNameColumn | Column that stores the name of attached files. Must be String type. | no |
| AttachmentFileOriginalNameColumn | Column that stores original file names for attachments. | no |
| AttachmentFileOriginalPathColumn | Column that stores original file location (path) for attachments. This parameter is useful for custom code in the client | no |
| AttachmentFileDescriptionColumn | Column that stores optional attachment description. | no |
| InsertAutomaticallyAttachment | Defines if attachment records are inserted automatically. If false, a
value for each key of this entity is required in the keysValues argument
when calling to prepareToReceive method. These values will be
used in the insert operation that is done in this method. Defined in
'InsertAutomaticallyAttachment' parameter. Default is false. |
no |
| AttachmentFileNameKeys | Defines which column values are used when generating filenames for
attachments, by calling getAttachmentFileNameForKeys()
method. If this parameter is not specified, the columns defined in 'keys'
are used. |
no |
| AttachmentFileSizeColumn | Defines which column of the table is used for storing the attachment file size in bytes. Optional. | no |
| TableAttributeEntities | List of entity names for which the TableAttribute information (keys,
attributes, ...) will be used when this entity queries another entities.
If an entity name is in this list, the columns of this entity defined as parentkeys in the TableAttribute, will be passed to the queried entity as filters. |
no |
| Autoconfiguration | If this parameter value is 'yes' then the configuration for this entity is automatically generated using the database metadata. Using this method, only a basic configuration can be obtained, and if possible, a properties file will be generated. | no |
When using attachments, the following basic actions must be granted for this entity:
Also, it is possible to define specific error messages for this entity
when SQLExceptions ocurr. This can be done defining properties with the
following format:
err_nnnn=error_message where nnnn is the SQLState
associated with the exception. This method calls
TableEntity.readProperties(String) with the standard location for this
entity's properties file.
readProperties in class TableEntityjava.lang.Exceptionpublic void loadAliasFile()
TableEntity
loadAliasFile in class TableEntityprotected java.lang.String getExtendedAliasPropertiesName()
TableEntity
getExtendedAliasPropertiesName in class TableEntityString with the file path.protected java.lang.String getExtendedPropertiesName()
TableEntity
getExtendedPropertiesName in class TableEntityString with the file path.public void setName(java.lang.String name)
setName in interface IdentifiedEntitysetName in class TableEntity
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||