public class SpaceDocument extends Object implements com.gigaspaces.entry.VirtualEntry, Externalizable
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
SpaceDocument |
addProperties(Map<String,Object> properties) |
boolean |
containsProperty(String name) |
boolean |
equals(Object obj) |
Map<String,Object> |
getProperties() |
<T> T |
getProperty(String name) |
String |
getTypeName() |
int |
getVersion() |
int |
hashCode() |
void |
initFromDocument(SpaceDocument document) |
protected void |
initialize() |
boolean |
isTransient() |
void |
readExternal(ObjectInput in)
This method is required by the
Externalizable interface and should not be called directly. |
void |
readExternalV1(ObjectInput in) |
<T> T |
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. |
public SpaceDocument()
public SpaceDocument(String typeName)
typeName - Name of document's type.protected void initialize()
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.VirtualEntrypublic 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 void writeExternal(ObjectOutput out) throws IOException
Externalizable interface and should not be called directly.writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
Externalizable interface and should not be called directly.readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void readExternalV1(ObjectInput in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic void initFromDocument(SpaceDocument document)
Copyright © GigaSpaces.