public class RecordNamespace extends AbstractContextNamespace
| Constructor and Description | 
|---|
| RecordNamespace(ModelProvider modelProvider,
               Namespace namespace,
               RecordHolder recordHolder)Creates new instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addNewVariable(java.lang.String name,
              Type type,
              boolean isDefinedInExpression,
              boolean readOnly)Adds a new variable. | 
| boolean | canBeInterpretedIn(InterpreterConfiguration configuration)Returns true if interpretation with given configuration can be done on this namespace. | 
| boolean | containsVariable(java.lang.String name)Returns  trueif this namespace contains variable of given name. | 
| BinaryHolder | createBinaryHolder(byte[] data)Creates binary data holder. | 
| BinaryHolder | createBinaryHolder(java.lang.String datasourceJndi,
                  java.lang.String recordType,
                  java.lang.String primaryKeyString,
                  java.lang.String propertyName,
                  java.sql.Blob data)Creates binary data holder. | 
| Namespace | createChildNamespace(java.lang.String name,
                    java.util.List<? extends Field> fields,
                    java.util.List<?> initialValues,
                    java.util.Map<FreeType,Type> freeTypeMapping,
                    InterpreterConfiguration configuration) | 
| 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(java.util.Collection<?> values)Creates new list with given values ( ListHolders are immutable). | 
| MapHolder | createMap(java.util.List<?> keys,
         java.util.List<?> values)Creates new map with given values ( MapHolders are immutable). | 
| MapHolder | createMap(java.util.Map<?,?> values)Creates new map with given values ( MapHolders are immutable). | 
| RecordHolder | createNonSharedRecord(RecordType type,
                     java.util.Map<java.lang.String,?> values)Creates new record of given type. | 
| RecordHolder | createRecord(RecordType type,
            java.util.Map<java.lang.String,?> values)Creates new record with given type. | 
| RecordHolder | createRecord(java.lang.String type,
            java.util.Map<java.lang.String,?> values)Creates new record with given type. | 
| ReferenceHolder | createReference(ReferenceType referenceType,
               ReferenceExpression referenceExpression,
               java.util.List<Property> properties,
               ClosureOrigin origin)Returns new reference corresponding to given reference expression. | 
| SetHolder | createSet(java.util.Collection<?> values)Creates new set with given values ( SetHolders are immutable). | 
| InterpreterConfiguration | getConfiguration()Returns interpreter configurartion for this namespace. | 
| Type | getFreeType(FreeType type)Returns the value of given free type or null if it does not exist in this context. | 
| HolderFactory | getHolderFactory()Returns an instance of  HolderFactory. | 
| java.lang.Object | getJavaObject()Returns underlying java object if there is some. | 
| Namespace | getLowerLevelNamespace()Returns namespace corresponding to this namespace on lower level. | 
| java.lang.String | getModelElementId()Returns id of model element that is related to this namespace. | 
| java.util.Collection<java.lang.String> | getModuleNames()Returns collection of all module names. | 
| Namespace | getModuleNamespace(java.lang.String name)Returns module namespace by its module name or  nullif it does not exist. | 
| java.lang.String | getName()Returns name of this namespace. | 
| AbstractContextNamespace | getNamespaceInLevel(java.lang.String evaluationLevel)Returns namespace in evaluation level. | 
| NamespaceModel | getNamespaceModel()Returns  NamespaceModelfor this namespace. | 
| Namespace | getParentNamespace()Returns parent namespace or  nullif this is top namespace. | 
| QID | getPathQID()Returns  QIDof the context path. | 
| RecordHolder | getThis()Returns object that represents this. | 
| java.util.Set<java.lang.String> | getVariableNames()Returns the names of all the variables. | 
| Type | getVariableType(java.lang.String name)Returns the type of variable or null if it does not exist. | 
| java.lang.Object | getVariableValue(java.lang.String name)Returns value of variable for given name from this namespace. | 
| void | initializeVariable(java.lang.String name,
                  java.lang.Object value)Sets the initial value of a variable. | 
| boolean | isVariableReadOnly(java.lang.String name)Returns  trueif the variable with a given name is read-only. | 
| void | setAsType(RecordType type)If set the namespace behaves like if it is namespace for the type. | 
| void | setVariableValue(java.lang.String name,
                java.lang.Object value)Sets value of variable for given name from this namespace. | 
createChildNamespaceInternal, createRange, executeJavaOperation, getAllFreeTypeNames, getCompiled, getCompiled, getCompiledContext, getConstantValue, getContext, getContextId, getConverter, getEvaluationConverter, getEvaluationLevel, getExecutionContext, getFunctionContext, getModelId, getModelInstanceId, getModelProvider, getNamespace, getProcessModel, getReferencedContext, remove, resolveType, setCompiled, setVariableValueInternal, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddNewVariable, createChildNamespace, getFreeTypeMapping, getTopNamespace, resolveRecordTypecreateRecord, createRecordpublic RecordNamespace(ModelProvider modelProvider, Namespace namespace, RecordHolder recordHolder)
modelProvider - namespace - recordHolder - public void setAsType(RecordType type)
type - public RecordHolder createExternalRecordProxy(RecordType type, RecordHolder proxySet)
HolderFactorypublic RecordHolder createRecord(RecordType type, java.util.Map<java.lang.String,?> values)
HolderFactoryvalues - initial record field valuespublic RecordHolder createNonSharedRecord(RecordType type, java.util.Map<java.lang.String,?> values)
HolderFactoryvalues - initial record field valuespublic RecordHolder createRecord(java.lang.String type, java.util.Map<java.lang.String,?> values)
HolderFactoryvalues - initial record field valuesRecordTypepublic ListHolder createList(java.util.Collection<?> values)
HolderFactoryListHolders are immutable).
 The type is inferred from the types of the values.public SetHolder createSet(java.util.Collection<?> values)
HolderFactorySetHolders are immutable). The
 type is inferred from the types of the values.public MapHolder createMap(java.util.List<?> keys, java.util.List<?> values)
HolderFactoryMapHolders are immutable). The
 type is inferred from the types of the values.keys - a list of keysvalues - a list of valuespublic MapHolder createMap(java.util.Map<?,?> values)
HolderFactoryMapHolders are immutable). The
 type is inferred from the types of the values.public ClosureHolder createClosure(ClosureType closureType, ClosureExpression closureExpression, ClosureOrigin origin)
HolderFactorypublic ClosureHolder createClosureFromExpression(ClosureType closureType, Expression expression, ClosureOrigin origin)
HolderFactorypublic ClosureHolder createClosure(ClosureType closureType, FunctionExpression operationExpression, ClosureOrigin origin)
HolderFactorypublic ClosureHolder createClosure(ClosureType closureType, MethodExpression operationExpression, ClosureOrigin origin)
HolderFactorypublic ReferenceHolder createReference(ReferenceType referenceType, ReferenceExpression referenceExpression, java.util.List<Property> properties, ClosureOrigin origin)
HolderFactorypublic BinaryHolder createBinaryHolder(byte[] data)
HolderFactorypublic BinaryHolder createBinaryHolder(java.lang.String datasourceJndi, java.lang.String recordType, java.lang.String primaryKeyString, java.lang.String propertyName, java.sql.Blob data)
HolderFactorypublic java.lang.String getName()
Namespacenull and does not have to be
 unique. Multiple namespaces can share same name.getName in interface NamespacegetName in class AbstractContextNamespacepublic Namespace getParentNamespace()
Namespacenull if this is top namespace.public Namespace getModuleNamespace(java.lang.String name)
Namespacenull if it does not exist.public java.util.Collection<java.lang.String> getModuleNames()
NamespacegetModuleNames in interface NamespacegetModuleNames in class AbstractContextNamespacepublic boolean containsVariable(java.lang.String name)
Namespacetrue if this namespace contains variable of given name.name - variable namepublic java.util.Set<java.lang.String> getVariableNames()
Namespacepublic java.lang.Object getVariableValue(java.lang.String name)
NamespaceNull is returned
 if this namespace does not contain given variable.getVariableValue in interface NamespacegetVariableValue in class AbstractContextNamespacename - variable namepublic void setVariableValue(java.lang.String name,
                             java.lang.Object value)
Namespacename - variable namevalue - new variable valuepublic void initializeVariable(java.lang.String name,
                               java.lang.Object value)
Namespacepublic Type getVariableType(java.lang.String name)
Namespacename - variable namepublic boolean isVariableReadOnly(java.lang.String name)
Namespacetrue if the variable with a given name is read-only.true if the variable is read-onlypublic HolderFactory getHolderFactory()
NamespaceHolderFactory. This can be used to create different runtime
 objects.HolderFactorypublic Namespace createChildNamespace(java.lang.String name, java.util.List<? extends Field> fields, java.util.List<?> initialValues, java.util.Map<FreeType,Type> freeTypeMapping, InterpreterConfiguration configuration)
public Type getFreeType(FreeType type)
NamespacegetFreeType in interface NamespacegetFreeType in class AbstractContextNamespacepublic void addNewVariable(java.lang.String name,
                           Type type,
                           boolean isDefinedInExpression,
                           boolean readOnly)
Namespacepublic InterpreterConfiguration getConfiguration()
Namespacepublic boolean canBeInterpretedIn(InterpreterConfiguration configuration)
Namespacepublic AbstractContextNamespace getNamespaceInLevel(java.lang.String evaluationLevel)
NamespacegetNamespaceInLevel in interface NamespacegetNamespaceInLevel in class AbstractContextNamespacepublic Namespace getLowerLevelNamespace()
Namespacepublic NamespaceModel getNamespaceModel()
NamespaceNamespaceModel for this namespace.getNamespaceModel in interface NamespacegetNamespaceModel in class AbstractContextNamespaceNamespaceModel for this namespacepublic java.lang.String getModelElementId()
NamespacegetModelElementId in interface NamespacegetModelElementId in class AbstractContextNamespacepublic QID getPathQID()
NamespaceQID of the context path.getPathQID in interface NamespacegetPathQID in class AbstractContextNamespaceQID of the context pathpublic RecordHolder getThis()
NamespacegetThis in interface NamespacegetThis in class AbstractContextNamespacepublic java.lang.Object getJavaObject()
NamespaceCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.