jsdai.lang
Class QueryResultSet.ItemStruct

java.lang.Object
  extended byjsdai.lang.QueryResultSet.ItemStruct
All Implemented Interfaces:
java.io.Serializable, jsdai.query.SerializableRef
Enclosing class:
QueryResultSet

public static class QueryResultSet.ItemStruct
extends java.lang.Object
implements jsdai.query.SerializableRef

This class is a structure to store query result item value in an efficient way. It implements interface SerializableRef therefore objects of class can be passed to getXxxByRef methods directly as long as they contain reference to JSDAI object of interest.

Since:
3.6.0
See Also:
SdaiSession.getRepositoryByRef(SerializableRef), SdaiRepository.getSdaiModelByRef(SerializableRef), SdaiRepository.getSchemaInstanceByRef(SerializableRef), SdaiRepository.getInstanceByRef(SerializableRef), Serialized Form

Field Summary
 char itemType
          This field containts the item type.
 long modelId
          A database id of the remote model which contains the referenced entity instance.
 double numericValue
          A numeric value
 long persistentLabel
          A persistent label of a remote entity instance
 long repositoryId
          A database id of the remote repository which contains the referenced entity instance.
 java.lang.String stringValue
          A string value
static char TYPE_ENTITY
          This structure contains a reference to entity instance.
static char TYPE_NUMERIC
          This structure contains a reference to numeric value.
static char TYPE_STRING
          This structure contains a reference to string value.
 int typeIndex
          An entity instance type index or -1 if this information is not available
 
Fields inherited from interface jsdai.query.SerializableRef
AENTITY_REF, ASCHEMA_INSTANCE_REF, ASDAI_MODEL_REF, EENTITY_REF, SCHEMA_INSTANCE_REF, SDAI_MODEL_REF, SDAI_REPOSITORY_REF
 
Constructor Summary
QueryResultSet.ItemStruct()
           
 
Method Summary
 jsdai.query.SerializableRef[] getMembers()
          Not implemented method of SerializableRef because this structure can not contain this type of information.
 long getModelId()
          Returns SdaiModel identifier on remote database.
 long getPersistentLabel()
          Returns EEntity instance persistent label.
 long getRepositoryId()
          Returns SdaiRepository identifier on remote database.
 long getSchemaInstanceId()
          Not implemented method of SerializableRef because this structure can not contain this type of information.
 int getType()
          Returns type of this reference.
 int getTypeIndex()
          Returns EEntity instance type index which is the internal JSDAI index to increase the instance searching speed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ENTITY

public static final char TYPE_ENTITY
This structure contains a reference to entity instance. The following fields are filled in it: repositoryId, modelId, persistentLabel and typeIndex. The structure is available for use as SerializableRef.

See Also:
Constant Field Values

TYPE_NUMERIC

public static final char TYPE_NUMERIC
This structure contains a reference to numeric value. The field numericValue is filled in.

See Also:
Constant Field Values

TYPE_STRING

public static final char TYPE_STRING
This structure contains a reference to string value. The field stringValue is filled in.

See Also:
Constant Field Values

itemType

public char itemType
This field containts the item type. It can be one of: TYPE_ENTITY, TYPE_NUMERIC or TYPE_STRING


repositoryId

public long repositoryId
A database id of the remote repository which contains the referenced entity instance.

See Also:
TYPE_ENTITY

modelId

public long modelId
A database id of the remote model which contains the referenced entity instance.

See Also:
TYPE_ENTITY

persistentLabel

public long persistentLabel
A persistent label of a remote entity instance

See Also:
TYPE_ENTITY

typeIndex

public int typeIndex
An entity instance type index or -1 if this information is not available

See Also:
TYPE_ENTITY

numericValue

public transient double numericValue
A numeric value

See Also:
TYPE_NUMERIC

stringValue

public transient java.lang.String stringValue
A string value

See Also:
TYPE_STRING
Constructor Detail

QueryResultSet.ItemStruct

public QueryResultSet.ItemStruct()
Method Detail

getType

public int getType()
Returns type of this reference.

Specified by:
getType in interface jsdai.query.SerializableRef
Returns:
EENTITY_REF if this is a reference to entity instance or -1 otherwise

getRepositoryId

public long getRepositoryId()
Returns SdaiRepository identifier on remote database.

Specified by:
getRepositoryId in interface jsdai.query.SerializableRef
Returns:
the SdaiRepository identifier or -1 is this reference does not contain the reference to SdaiRepository

getModelId

public long getModelId()
Returns SdaiModel identifier on remote database.

Specified by:
getModelId in interface jsdai.query.SerializableRef
Returns:
the SdaiModel identifier or -1 is this reference does not contain the reference to SdaiModel

getPersistentLabel

public long getPersistentLabel()
Returns EEntity instance persistent label.

Specified by:
getPersistentLabel in interface jsdai.query.SerializableRef
Returns:
the EEntity instance persistent label or -1 is this reference does not contain the reference to EEntity

getTypeIndex

public int getTypeIndex()
Returns EEntity instance type index which is the internal JSDAI index to increase the instance searching speed.

Specified by:
getTypeIndex in interface jsdai.query.SerializableRef
Returns:
the EEntity instance type index or -1 is this reference does not contain this index

getSchemaInstanceId

public long getSchemaInstanceId()
Not implemented method of SerializableRef because this structure can not contain this type of information.

Specified by:
getSchemaInstanceId in interface jsdai.query.SerializableRef
Returns:
-1

getMembers

public jsdai.query.SerializableRef[] getMembers()
Not implemented method of SerializableRef because this structure can not contain this type of information.

Specified by:
getMembers in interface jsdai.query.SerializableRef
Returns:
null

Copyright © LKSoftWare GmbH, 1999-2008