@PermitAll public class SharedRecordTypeFactoryImpl extends Object implements SharedRecordTypeFactory
Constructor and Description |
---|
SharedRecordTypeFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addToBatchLoading(Collection<ExternalValue> values)
Register value to be loaded in batch
|
void |
addToBatchLoading(ExternalValue value,
RecordType type)
Register value to be loaded in batch
|
RecordHolder |
convertJavaObjectToHolder(ModelInstance modelInstance,
RecordType recordType,
Object value)
Converts given java object to external holder.
|
RecordHolder |
convertValueToHolder(ExternalValue value,
RecordType type)
Converts given external type value to external holder.
|
Decimal |
count(ExecutionContext context,
ClosureHolder closureWithQuery,
String iterator,
Expression whereExpression)
Dynamically creates query and executes it.
|
Decimal |
count(ExecutionContext context,
Object querySpecification,
Collection<?> parameters)
Executes the given HQL query specification and returns the number of all objects in the result (executes count query).
|
Decimal |
count(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType,
String iterator,
Expression whereExpression)
Dynamically creates query and executes it.
|
RecordHolder |
createRecord(ModelInstance modelInstance,
RecordType type,
Map<String,?> values)
Creates a new record of the specified type.
|
RecordHolder |
createRecord(ModelInstance modelInstance,
RecordType type,
Map<String,?> values,
boolean flush)
Creates a new record of the specified type.
|
Object |
getEntity(ExternalRecordHolder recordHolder)
Returns entity for the holder.
|
Object |
getEntity(ModelInstance modelInstance,
RecordType type,
Serializable id)
Returns a Hibernate entity for the given model, type and id.
|
Object |
getEntity(ModelInstance modelInstance,
RecordType type,
Serializable id,
Long auditRevisionId)
Returns a Hibernate entity for the given model, type and id.
|
ExternalRecordHolder |
getRecord(ModelInstance modelInstance,
Object entity)
Returns a shared record for the given Hibernate entity.
|
ExternalRecordHolder |
getRecord(ModelInstance modelInstance,
RecordType type,
Serializable id)
Returns a shared record for the given type and id.
|
ExternalRecordHolder |
getRecord(ModelInstance modelInstance,
RecordType type,
Serializable id,
Long auditRevisionId)
Returns a shared record for the given type and id.
|
ExternalRecordHolder |
getRecord(ModelInstance modelInstance,
String type,
Serializable id)
Returns a shared record for the given type and id.
|
ExternalRecordHolder |
getRecord(ModelInstance modelInstance,
String type,
Serializable id,
Long auditRevisionId)
Returns a shared record for the given type and id.
|
Collection<String> |
getSupportedRecordTypes()
Returns a collection of supported record types.
|
Decimal |
hqlQueryCount(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification,
Collection<?> parameters)
Executes the given HQL count query.
|
ListHolder |
hqlQueryList(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification,
Collection<?> parameters)
Executes the given HQL query specification and returns the result.
|
Object |
hqlQuerySingle(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification,
Collection<?> parameters)
Executes the given HQL query specification and returns the first result.
|
ListHolder |
queryAuditList(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType,
String recordIterator,
Expression whereExpression,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count,
Long revision,
List<AuditCriteria> auditCriteria)
Dynamically creates query and executes it.
|
ListHolder |
queryList(ExecutionContext context,
ClosureHolder closureWithQuery,
String recordIterator,
Expression whereExpression,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count)
Dynamically creates query and executes it.
|
ListHolder |
queryList(ExecutionContext context,
Object querySpecification,
Collection<?> parameters)
Executes the given HQL query specification and returns the result.
|
ListHolder |
queryList(ExecutionContext context,
com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType,
String recordIterator,
Expression whereExpression,
List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings,
Integer index,
Integer count)
Dynamically creates query and executes it.
|
Object |
querySingle(ExecutionContext context,
Object querySpecification,
Collection<?> parameters)
Executes the given HQL query specification and returns the first result.
|
public void addToBatchLoading(ExternalValue value, RecordType type)
addToBatchLoading
in interface ExternalTypeFactory
value
- public void addToBatchLoading(Collection<ExternalValue> values)
ExternalTypeFactory
addToBatchLoading
in interface ExternalTypeFactory
public RecordHolder convertValueToHolder(ExternalValue value, RecordType type)
ExternalTypeFactory
convertValueToHolder
in interface ExternalTypeFactory
public RecordHolder convertJavaObjectToHolder(ModelInstance modelInstance, RecordType recordType, Object value)
ExternalTypeFactory
convertJavaObjectToHolder
in interface ExternalTypeFactory
public RecordHolder createRecord(ModelInstance modelInstance, RecordType type, Map<String,?> values)
ExternalTypeFactory
createRecord
in interface ExternalTypeFactory
modelInstance
- the model instancetype
- the record typevalues
- initial record field values @return new RecordHolderpublic RecordHolder createRecord(ModelInstance modelInstance, RecordType type, Map<String,?> values, boolean flush)
SharedRecordTypeFactory
createRecord
in interface SharedRecordTypeFactory
modelInstance
- the model instancetype
- the record typevalues
- initial record field values @return new RecordHolderflush
- a flag indicating whether Hibernate session should be immediatelly flushedpublic Collection<String> getSupportedRecordTypes()
ExternalTypeFactory
getSupportedRecordTypes
in interface ExternalTypeFactory
public ExternalRecordHolder getRecord(ModelInstance modelInstance, Object entity)
SharedRecordTypeFactory
getRecord
in interface SharedRecordTypeFactory
public ListHolder queryList(ExecutionContext context, Object querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
queryList
in interface SharedRecordTypeFactory
ErrorException
public ListHolder queryList(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType, String recordIterator, Expression whereExpression, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count) throws ErrorException, ValidationException
SharedRecordTypeFactory
queryList
in interface SharedRecordTypeFactory
ErrorException
ValidationException
public ListHolder queryList(ExecutionContext context, ClosureHolder closureWithQuery, String recordIterator, Expression whereExpression, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count) throws ErrorException, ValidationException
SharedRecordTypeFactory
queryList
in interface SharedRecordTypeFactory
ErrorException
ValidationException
public Decimal count(ExecutionContext context, Object querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
count
in interface SharedRecordTypeFactory
ErrorException
public Decimal count(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType, String iterator, Expression whereExpression) throws ErrorException, ValidationException
SharedRecordTypeFactory
count
in interface SharedRecordTypeFactory
ErrorException
ValidationException
public Decimal count(ExecutionContext context, ClosureHolder closureWithQuery, String iterator, Expression whereExpression) throws ErrorException, ValidationException
SharedRecordTypeFactory
count
in interface SharedRecordTypeFactory
ErrorException
ValidationException
public Object querySingle(ExecutionContext context, Object querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
querySingle
in interface SharedRecordTypeFactory
ErrorException
public ExternalRecordHolder getRecord(ModelInstance modelInstance, RecordType type, Serializable id)
SharedRecordTypeFactory
getRecord
in interface SharedRecordTypeFactory
public ExternalRecordHolder getRecord(ModelInstance modelInstance, RecordType type, Serializable id, Long auditRevisionId)
SharedRecordTypeFactory
getRecord
in interface SharedRecordTypeFactory
public ExternalRecordHolder getRecord(ModelInstance modelInstance, String type, Serializable id)
SharedRecordTypeFactory
getRecord
in interface SharedRecordTypeFactory
public ExternalRecordHolder getRecord(ModelInstance modelInstance, String type, Serializable id, Long auditRevisionId)
SharedRecordTypeFactory
getRecord
in interface SharedRecordTypeFactory
public Object getEntity(ModelInstance modelInstance, RecordType type, Serializable id)
SharedRecordTypeFactory
getEntity
in interface SharedRecordTypeFactory
public Object getEntity(ModelInstance modelInstance, RecordType type, Serializable id, Long auditRevisionId)
SharedRecordTypeFactory
getEntity
in interface SharedRecordTypeFactory
public Object getEntity(ExternalRecordHolder recordHolder)
SharedRecordTypeFactory
getEntity
in interface SharedRecordTypeFactory
public ListHolder queryAuditList(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.SharedRecordType recordType, String recordIterator, Expression whereExpression, List<com.whitestein.lsps.model.sharedrecord.QueryOrderingItem> orderings, Integer index, Integer count, Long revision, List<AuditCriteria> auditCriteria) throws ErrorException, ValidationException
SharedRecordTypeFactory
queryAuditList
in interface SharedRecordTypeFactory
ErrorException
ValidationException
public ListHolder hqlQueryList(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
hqlQueryList
in interface SharedRecordTypeFactory
ErrorException
public Object hqlQuerySingle(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
hqlQuerySingle
in interface SharedRecordTypeFactory
ErrorException
public Decimal hqlQueryCount(ExecutionContext context, com.whitestein.lsps.model.sharedrecord.HQLQuerySpecification querySpecification, Collection<?> parameters) throws ErrorException
SharedRecordTypeFactory
hqlQueryCount
in interface SharedRecordTypeFactory
ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.