public class TemplateImpl extends Object implements IGSEntry
Constructor and Description |
---|
TemplateImpl() |
TemplateImpl(TemplateInfo template,
ITypeDesc typeDesc) |
Modifier and Type | Method and Description |
---|---|
String |
getClassName()
Entry class Name.
|
String |
getCodebase()
Entry-class codebase.
|
Entry |
getEntry(IJSpace space)
Deprecated.
|
int |
getFieldPosition(String fieldName)
Return the the field position in the
FieldsValues array. |
String[] |
getFieldsNames()
Entry fields names.
|
String[] |
getFieldsTypes()
Entry Fields Types.
|
Object[] |
getFieldsValues()
Entry field Values.
|
String |
getFieldType(String fieldName)
Retries the given field its type class name.
|
Object |
getFieldValue(int position)
Retrieves the given field value by position.
|
Object |
getFieldValue(String fieldName)
Retrieves the given field value.
|
boolean[] |
getIndexIndicators()
Indexed fields array indication.
|
Map.Entry |
getMapEntry()
Returns a Map.Entry (key-value pair) representation of this entity.
|
Object |
getObject(IJSpace space)
Converts to object.
|
String |
getPrimaryKeyName()
The field name representing the primary key.
|
String |
getRoutingFieldName() |
String[] |
getSuperClassesNames()
Entry Super Classes Names.
|
long |
getTimeToLive()
Entry time to live.
|
String |
getUID()
Entry UID.
|
int |
getVersion()
Ascending version of this Entry
|
boolean |
isFifo()
If true operations will be done using FIFO ordering when multiple match found.
|
boolean |
isIndexedField(String fieldName)
Checks if the given field is indexed.
|
boolean |
isReplicatable()
Check if replicatable, applicable only when used with partial replication.
|
boolean |
isTransient()
Checks entry is transient even if space is persistent.
|
Object |
setFieldValue(int position,
Object value)
Associates the specified value with the specified field position.
|
Object |
setFieldValue(String fieldName,
Object value)
Associates the specified value with the specified field.
|
public TemplateImpl()
public TemplateImpl(TemplateInfo template, ITypeDesc typeDesc)
template
- typeDesc
- public String getClassName()
IGSEntry
getClassName
in interface IGSEntry
public String getCodebase()
IGSEntry
getCodebase
in interface IGSEntry
public String[] getSuperClassesNames()
IGSEntry
getSuperClassesNames
in interface IGSEntry
public String[] getFieldsNames()
IGSEntry
getFieldsNames
in interface IGSEntry
public String[] getFieldsTypes()
IGSEntry
getFieldsTypes
in interface IGSEntry
public boolean[] getIndexIndicators()
IGSEntry
getIndexIndicators
in interface IGSEntry
public String getRoutingFieldName()
getRoutingFieldName
in interface IGSEntry
public String getPrimaryKeyName()
IGSEntry
getPrimaryKeyName
in interface IGSEntry
public String getFieldType(String fieldName)
IGSEntry
getFieldType
in interface IGSEntry
fieldName
- the field name.public boolean isIndexedField(String fieldName)
IGSEntry
isIndexedField
in interface IGSEntry
fieldName
- the field name.true
if the the field is indexed.public boolean isReplicatable()
IGSEntry
isReplicatable
in interface IGSEntry
true
if this entry is replicatable.public Object getFieldValue(String fieldName) throws IllegalArgumentException, IllegalStateException
IGSEntry
getFieldValue
in interface IGSEntry
fieldName
- name of the field (e.g. Field.getName()
.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic Object getFieldValue(int position) throws IllegalArgumentException, IllegalStateException
IGSEntry
getFieldValue
in interface IGSEntry
position
- the field position.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic int getFieldPosition(String fieldName)
IGSEntry
FieldsValues
array.getFieldPosition
in interface IGSEntry
fieldName
- name of the field (e.g. Field.getName()
.IGSEntry.getFieldsValues()
.@Deprecated public Entry getEntry(IJSpace space) throws UnusableEntryException
UnusableEntryException
public Object[] getFieldsValues()
IGSEntry
getFieldsValues
in interface IGSEntry
public Map.Entry getMapEntry()
IGSEntry
null
is returned.getMapEntry
in interface IGSEntry
null
if no
representation.Map.Entry
public Object getObject(IJSpace space) throws UnusableEntryException
IGSEntry
IGSEntry.setFieldValue(int, Object)
or IGSEntry.setFieldValue(String, Object)
.getObject
in interface IGSEntry
space
- Space proxy.UnusableEntryException
- One or more fields in the entry cannot be deserialized, or the
class for the entry type itself cannot be deserialized.public long getTimeToLive()
IGSEntry
getTimeToLive
in interface IGSEntry
Lease
public int getVersion()
IGSEntry
getVersion
in interface IGSEntry
public boolean isFifo()
IGSEntry
public Object setFieldValue(String fieldName, Object value) throws IllegalArgumentException, IllegalStateException
IGSEntry
setFieldValue
in interface IGSEntry
fieldName
- the field name.value
- value to be associated with the specified field.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic Object setFieldValue(int position, Object value) throws IllegalArgumentException, IllegalStateException
IGSEntry
setFieldValue
in interface IGSEntry
position
- the field position.value
- value to be associated with the specified field.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic boolean isTransient()
IGSEntry
isTransient
in interface IGSEntry
true
if entry is transientCopyright © GigaSpaces.