public class HibernateDataSource extends BasicDataSource
See the client reference documentation for details of configuring and using Hibernate DataSources - search for "hibernateIntegration". For a wider general discussion of data integration options with SmartClient Server, search the client documentation for "serverDataIntegration"
Modifier and Type | Field and Description |
---|---|
protected java.util.Map | additionalFields Holds list of additional fields requested by specific DSRequest . |
protected java.lang.String | configName Holds config name - can be configured with "jpaConfig" parameter. |
static java.lang.Character | ESCAPE_CHARACTER Holds character ('~') used to escape wild cards in 'like' clause. |
protected java.lang.Boolean | generateRelatedUpdates Holds value should related updates be generated. |
static java.lang.String | HB_CONFIG_PROPERTY Name of the Hibernate configuration name property. |
protected java.util.List | relatedUpdates Holds list of generated related updates. |
OP_ADD, OP_CLIENT_EXPORT, OP_CUSTOM, OP_DOWNLOAD_FILE, OP_FETCH, OP_GET_FILE, OP_GET_FILE_VERSION, OP_HAS_FILE, OP_HAS_FILE_VERSION, OP_LIST_FILE_VERSIONS, OP_LIST_FILES, OP_LOAD_SCHEMA, OP_REMOVE, OP_REMOVE_FILE, OP_REMOVE_FILE_VERSION, OP_RENAME_FILE, OP_SAVE_FILE, OP_UNIQUE_NAME, OP_UPDATE, OP_VALIDATE, OP_VIEW_FILE
Modifier and Type | Method and Description |
---|---|
static void | commitTransaction(org.hibernate.Transaction trx) Deprecated. As of SmartClient 8.0. Use HibernateTransaction.commitTransaction(com.isomorphic.datasource.DSTransaction) instead |
static java.lang.String | escapeValueForFilter(java.lang.Object value, char escapeChar) Escapes characters "_" and "%" with specified character in value object. |
DSField | getField(java.lang.String fieldName) Returns DSField by specified name. |
java.util.List | getFieldNames(boolean dropIgnored) Returns combined list of data source configured and request configured field names. |
static void | rollbackTransaction(org.hibernate.Transaction trx) Deprecated. As of SmartClient 8.0. Use HibernateTransaction.rollbackTransaction(com.isomorphic.datasource.DSTransaction) instead |
static org.hibernate.Transaction | startTransaction() Deprecated. As of SmartClient 8.0. Use HibernateTransaction.startTransaction(com.isomorphic.datasource.DSTransaction) instead |
getAuditDataSource, getAuditRecord, getAuditRecord, getListProperty, getMapProperty, getObjectProperty, getProperty, shouldAutoJoinTransaction, shouldAutoStartTransaction, transformMultipleFields, transformMultipleFields, writeMultiAudits
add, add, addDynamicDSGenerator, addDynamicDSGenerator, addDynamicDSGenerator, clearDynamicDSGenerators, convertRelativeDates, convertRelativeDates, convertRelativeDates, convertRelativeDates, convertRelativeDates, convertRelativeDates, execute, executeAdd, executeClientExport, executeCustom, executeFetch, executeFileSource, executeRemove, executeUpdate, fetch, fetch, fetchById, fetchById, fetchById, fetchSingle, fetchSingle, filter, filter, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, getAuditChangedFieldsFieldName, getAuditRevisionFieldName, getAuditTimestampFieldName, getAuditTypeFieldName, getAuditUserFieldName, getDefaultDynamicDSGenerator, getDirectFields, getDynamicDSGenerators, getEnumConstantProperty, getEnumOrdinalProperty, getEnumTranslateStrategy, getFieldNames, getFile, getFileAsInputStream, getFileAsString, getFileContentsField, getFileFormatField, getFileNameField, getFileTypeField, getID, getListProperties, getListProperties, getName, getNonIncludedFields, getPrimaryKey, getProperties, getProperties, getProperties, getPropertyJavaClass, getRecordXPath, getRelatedDisplayRecord, getRelatedDisplayRecord, getRelatedTableAlias, getTableName, getTransactionObject, getTransactionObject, hasFile, hasRecord, hasRecord, initialized, isModificationOperation, isServerOnly, listFiles, listFiles, listFiles, listFiles, remove, removeDynamicDSGenerator, removeDynamicDSGenerator, removeDynamicDSGenerator, removeFile, renameFile, saveFile, setEnumConstantProperty, setEnumOrdinalProperty, setEnumTranslateStrategy, setOmitNullMapValuesInResponse, setProperties, transformImportValue, transformImportValue, transformResponse, update, update, validate, validate, validate, validateRecord
public static final java.lang.Character ESCAPE_CHARACTER
public static final java.lang.String HB_CONFIG_PROPERTY
protected java.lang.String configName
protected java.util.List relatedUpdates
setProperties()
; subsequent calls to setRelationFieldValue()
will add DSResponse
objects for every change in related data sources.protected java.lang.Boolean generateRelatedUpdates
execute()
call. true
- related updates will be generated; false
- related updates will not be generated; null
- related updates will be generated only for "add" and "update" operations, related updates will not be generated for "remove" operation.protected java.util.Map additionalFields
DSRequest
.public java.util.List getFieldNames(boolean dropIgnored)
getFieldNames
in class DataSource
dropIgnored
- boolean
true
- ignored fields are dropped; false
- ignored fields are included;List
field names.public DSField getField(java.lang.String fieldName)
DSField
by specified name. First checks data source configured fields. Checks request configured fields if it is not found within data source configured fields. Returns null
if fieldName
parameter is null
or field is not found.getField
in class BasicDataSource
fieldName
- the name of the field whose definition you wantDSField
field.DSField
public static java.lang.String escapeValueForFilter(java.lang.Object value, char escapeChar)
value
- Object
Value which should be escaped.escapeChar
- char
ecape character.String
Escaped string value.public static org.hibernate.Transaction startTransaction() throws java.lang.Exception
HibernateTransaction.startTransaction(com.isomorphic.datasource.DSTransaction)
insteadHibernateDataSource.commitTransaction(org.hibernate.Transaction)
orHibernateDataSource.rollbackTransaction(org.hibernate.Transaction)
is called for the transaction.java.lang.Exception
public static void rollbackTransaction(org.hibernate.Transaction trx) throws java.lang.Exception
HibernateTransaction.rollbackTransaction(com.isomorphic.datasource.DSTransaction)
insteadjava.lang.Exception
- if problems were found rolling back the transactionpublic static void commitTransaction(org.hibernate.Transaction trx) throws java.lang.Exception
HibernateTransaction.commitTransaction(com.isomorphic.datasource.DSTransaction)
insteadjava.lang.Exception
- if problems were found committing the transaction