public class MockHolderFactory extends Object implements HolderFactory
Constructor and Description |
---|
MockHolderFactory(Namespace namespace)
Creates new instance of
MockHolderFactory . |
Modifier and Type | Method and Description |
---|---|
BinaryHolder |
createBinaryHolder(byte[] data)
Creates binary data holder.
|
BinaryHolder |
createBinaryHolder(String datasourceJndi,
String recordType,
String primaryKeyString,
String propertyName,
Blob data)
Creates binary data holder.
|
ClosureHolder |
createClosure(ClosureType closureType,
ClosureExpression closureExpression,
ClosureOrigin origin)
Creates new closure corresponding to given closure expression.
|
ClosureHolder |
createClosure(ClosureType closureType,
FunctionExpression operationExpression,
ClosureOrigin origin)
Creates new closure corresponding to given operation expression.
|
ClosureHolder |
createClosure(ClosureType closureType,
MethodExpression operationExpression,
ClosureOrigin origin)
Creates new closure corresponding to given operation expression.
|
ClosureHolder |
createClosureFromExpression(ClosureType closureType,
Expression expression,
ClosureOrigin origin)
Creates new closure from a given expression.
|
RecordHolder |
createExternalRecordProxy(RecordType type,
RecordHolder proxySet)
Creates a proxy without proxied record.
|
ListHolder |
createList(Collection<?> values)
Creates new list with given values (
ListHolder s are immutable). |
MapHolder |
createMap(List<?> keys,
List<?> values)
Creates new map with given values (
MapHolder s are immutable). |
MapHolder |
createMap(Map<?,?> values)
Creates new map with given values (
MapHolder s are immutable). |
RecordHolder |
createNonSharedRecord(RecordType type,
Map<String,?> values)
Creates new record of given type.
|
ListHolder |
createRange(long first,
long last)
Creates a range (list) defined by endpoints (both inclusive).
|
RecordHolder |
createRecord(RecordType type,
Map<String,?> values)
Creates new record with given type.
|
RecordHolder |
createRecord(String type,
Map<String,?> values)
Creates new record with given type.
|
ReferenceHolder |
createReference(ReferenceType referenceType,
ReferenceExpression referenceExpression,
List<Property> properties,
ClosureOrigin origin)
Returns new reference corresponding to given reference expression.
|
SetHolder |
createSet(Collection<?> values)
Creates new set with given values (
SetHolder s are immutable). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRecord, createRecord
public MockHolderFactory(Namespace namespace)
MockHolderFactory
.namespace
- public ListHolder createList(Collection<?> values)
HolderFactory
ListHolder
s are immutable).
The type is inferred from the types of the values.createList
in interface HolderFactory
public ListHolder createRange(long first, long last)
HolderFactory
If first <= last
, the range contains elements first, first + 1, ..., last
.
If first > last
, the range contains elements first, first - 1, ..., last
.
The memory footprint of range in constant (only endpoints and size is stored, not all elements).
createRange
in interface HolderFactory
public MapHolder createMap(List<?> keys, List<?> values)
HolderFactory
MapHolder
s are immutable). The
type is inferred from the types of the values.createMap
in interface HolderFactory
keys
- a list of keysvalues
- a list of valuespublic MapHolder createMap(Map<?,?> values)
HolderFactory
MapHolder
s are immutable). The
type is inferred from the types of the values.createMap
in interface HolderFactory
public RecordHolder createExternalRecordProxy(RecordType type, RecordHolder proxySet)
HolderFactory
createExternalRecordProxy
in interface HolderFactory
public RecordHolder createRecord(RecordType type, Map<String,?> values)
HolderFactory
createRecord
in interface HolderFactory
values
- initial record field valuespublic RecordHolder createNonSharedRecord(RecordType type, Map<String,?> values)
HolderFactory
createNonSharedRecord
in interface HolderFactory
values
- initial record field valuespublic RecordHolder createRecord(String type, Map<String,?> values)
HolderFactory
createRecord
in interface HolderFactory
values
- initial record field valuesRecordType
public SetHolder createSet(Collection<?> values)
HolderFactory
SetHolder
s are immutable). The
type is inferred from the types of the values.createSet
in interface HolderFactory
public ClosureHolder createClosure(ClosureType closureType, ClosureExpression closureExpression, ClosureOrigin origin)
HolderFactory
createClosure
in interface HolderFactory
public ClosureHolder createClosure(ClosureType closureType, FunctionExpression operationExpression, ClosureOrigin origin)
HolderFactory
createClosure
in interface HolderFactory
public ClosureHolder createClosure(ClosureType closureType, MethodExpression operationExpression, ClosureOrigin origin)
HolderFactory
createClosure
in interface HolderFactory
public ClosureHolder createClosureFromExpression(ClosureType closureType, Expression expression, ClosureOrigin origin)
HolderFactory
createClosureFromExpression
in interface HolderFactory
public ReferenceHolder createReference(ReferenceType referenceType, ReferenceExpression referenceExpression, List<Property> properties, ClosureOrigin origin)
HolderFactory
createReference
in interface HolderFactory
public BinaryHolder createBinaryHolder(byte[] data)
HolderFactory
createBinaryHolder
in interface HolderFactory
public BinaryHolder createBinaryHolder(String datasourceJndi, String recordType, String primaryKeyString, String propertyName, Blob data)
HolderFactory
createBinaryHolder
in interface HolderFactory
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.