com.isomorphic.jpa
Class JPA2DataSource

com.isomorphic.datasource.DataSource
  extended by com.isomorphic.datasource.BasicDataSource
      extended by com.isomorphic.jpa.JPADataSource
          extended by com.isomorphic.jpa.JPA2DataSource
All Implemented Interfaces:
IToJSON, RPCManagerCompletionCallback

public class JPA2DataSource
extends JPADataSource

Server side implementation of JPA 2.0 data source.

Supports all AdvancedCriteria criterions except "regexp" and "iregexp".

Declaring JPA 2.0 usage in persistence.xml:

 <persistence
      version="2.0"
      xmlns="http://java.sun.com/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
 ...
 </persistence>
Implementation is not thread-safe. Data source acquiring mechanism enshures that single instance of this class will be used in one thread only.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.isomorphic.jpa.JPADataSource
additionalFields, AUTO_DERIVE_PROPERTY, BEAN_CLASS_PROPERTY, beanClass, beanName, configName, connectionHolder, em, ESCAPE_CHARACTER, ID_CLASS_PROPERTY, idClass, JPA_CONFIG_PROPERTY, SCHEMA_BEAN_PROPERTY, shouldRollBackTransaction, strictSQLFiltering, tx, USE_QUALIFIED_CLASS_NAME_PROPERTY, useQualifiedClassName
 
Fields inherited from class com.isomorphic.datasource.DataSource
inInitState, OP_ADD, OP_CLIENT_EXPORT, OP_CUSTOM, OP_FETCH, OP_REMOVE, OP_UPDATE, OP_VALIDATE
 
Method Summary
 java.util.Map deriveDS(java.lang.String schemaBean, java.lang.String id, boolean extended)
          Creates data source configuration from specified fully qualified class name.
 
Methods inherited from class com.isomorphic.jpa.JPADataSource
escapeValueForFilter, execute, executeAdd, executeFetch, executeRemove, executeUpdate, freeResources, getField, getFieldNames, getTransactionObjectKey, increaseOpCount, init, markTransactionForRollBack, onFailure, onFailure, onSuccess, onSuccess
 
Methods inherited from class com.isomorphic.datasource.BasicDataSource
getProperty, shouldAutoJoinTransaction, shouldAutoStartTransaction
 
Methods inherited from class com.isomorphic.datasource.DataSource
add, addDynamicDSGenerator, addDynamicDSGenerator, addDynamicDSGenerator, clearDynamicDSGenerators, executeClientExport, executeCustom, fetch, fetch, fetchById, fetchSingle, fetchSingle, filter, filter, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, getEnumConstantProperty, getEnumOrdinalProperty, getEnumTranslateStrategy, getFieldNames, getListProperties, getListProperties, getPrimaryKey, getProperties, getProperties, getProperties, getPropertyJavaClass, getRecordXPath, getTransactionObject, getTransactionObject, hasRecord, hasRecord, initialized, isModificationOperation, remove, removeDynamicDSGenerator, removeDynamicDSGenerator, removeDynamicDSGenerator, setEnumConstantProperty, setEnumOrdinalProperty, setEnumTranslateStrategy, setProperties, update, validate
 
Methods inherited from interface com.isomorphic.js.IToJSON
toJSON
 

Method Detail

deriveDS

public java.util.Map deriveDS(java.lang.String schemaBean,
                              java.lang.String id,
                              boolean extended)
Description copied from class: JPADataSource
Creates data source configuration from specified fully qualified class name.

Overrides:
deriveDS in class JPADataSource
Parameters:
schemaBean - String Fully qualified class name.
id - String Id for newly created data source.
extended - boolean Extended properties will be captured if set to true.
Returns:
Map<String, Object> created data source configuration or null if it can not be created.