|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gigaspaces.document.SpaceDocument
public class SpaceDocument
Represents a document which can be stored and retrieved from the space.
A document is a collection of properties (which are name-value pairs) associated with a type.
A property name is a string. A property value can be of any type, but it is usually either a scalar
(e.g. int, String, Date, etc.), a set of properties (either Map or
DocumentProperties), or an array/collection or scalars or maps.
Documents of the same type can have different properties, which provides more dynamic schema than POJOs.
DocumentProperties,
SpaceTypeDescriptor,
Serialized Form| Constructor Summary | |
|---|---|
SpaceDocument()
Creates a space document of type java.lang.Object. |
|
SpaceDocument(String typeName)
Creates a space document of the specified type. |
|
SpaceDocument(String typeName,
Map<String,Object> properties)
Creates a space document of the specified type with the specified properties. |
|
| Method Summary | ||
|---|---|---|
SpaceDocument |
addProperties(Map<String,Object> properties)
|
|
boolean |
containsProperty(String name)
|
|
boolean |
equals(Object obj)
|
|
Map<String,Object> |
getProperties()
|
|
|
getProperty(String name)
|
|
String |
getTypeName()
|
|
int |
getVersion()
|
|
int |
hashCode()
|
|
boolean |
isTransient()
|
|
void |
readExternal(ObjectInput in)
This method is required by the Externalizable interface and should not be called directly. |
|
void |
readExternalV1(ObjectInput in)
|
|
|
removeProperty(String name)
|
|
SpaceDocument |
setProperty(String name,
Object value)
|
|
SpaceDocument |
setTransient(boolean isTransient)
|
|
SpaceDocument |
setTypeName(String typeName)
|
|
SpaceDocument |
setVersion(int version)
|
|
String |
toString()
|
|
void |
writeExternal(ObjectOutput out)
This method is required by the Externalizable interface and should not be called directly. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SpaceDocument()
public SpaceDocument(String typeName)
typeName - Name of document's type.
public SpaceDocument(String typeName,
Map<String,Object> properties)
typeName - Name of document's type.properties - Properties to set in document.| Method Detail |
|---|
public String getTypeName()
getTypeName in interface com.gigaspaces.entry.VirtualEntrypublic SpaceDocument setTypeName(String typeName)
setTypeName in interface com.gigaspaces.entry.VirtualEntrypublic boolean containsProperty(String name)
containsProperty in interface com.gigaspaces.entry.VirtualEntrypublic <T> T getProperty(String name)
getProperty in interface com.gigaspaces.entry.VirtualEntry
public SpaceDocument setProperty(String name,
Object value)
setProperty in interface com.gigaspaces.entry.VirtualEntrypublic <T> T removeProperty(String name)
removeProperty in interface com.gigaspaces.entry.VirtualEntrypublic Map<String,Object> getProperties()
getProperties in interface com.gigaspaces.entry.VirtualEntrypublic SpaceDocument addProperties(Map<String,Object> properties)
addProperties in interface com.gigaspaces.entry.VirtualEntrypublic int getVersion()
getVersion in interface com.gigaspaces.entry.VirtualEntrypublic SpaceDocument setVersion(int version)
setVersion in interface com.gigaspaces.entry.VirtualEntrypublic boolean isTransient()
isTransient in interface com.gigaspaces.entry.VirtualEntrypublic SpaceDocument setTransient(boolean isTransient)
setTransient in interface com.gigaspaces.entry.VirtualEntrypublic String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void writeExternal(ObjectOutput out)
throws IOException
Externalizable interface and should not be called directly.
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
Externalizable interface and should not be called directly.
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void readExternalV1(ObjectInput in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||