Package com.gigaspaces.entry
Interface VirtualEntry
- All Known Implementing Classes:
CDCInfo,DeletedDocumentInfo,SpaceDocument
public interface VirtualEntry
- Author:
- Niv Ingberg
-
Method Summary
Modifier and TypeMethodDescriptionaddProperties(Map<String, Object> properties) Adds the specified properties to the document's current properties.booleancontainsProperty(String name) Returns true if this document contains the specified property.Returns an unmodifiable view of the document's properties.<T> TgetProperty(String name) Gets a property's value by its name.intReturns the entry's version.boolean<T> TremoveProperty(String name) Removes the property from the document (if it exists).setProperty(String name, Object value) Sets a property's value by its name.setTransient(boolean isTransient) Sets whether or not the entry is transient.setTypeName(String typeName) Sets the document type name.setVersion(int version) Sets the entry's version.
-
Method Details
-
getTypeName
String getTypeName()- Returns:
- the type name.
-
setTypeName
Sets the document type name.- Parameters:
typeName- Type name to set.- Returns:
- This document (used for fluent method chaining).
-
getVersion
int getVersion()Returns the entry's version.- Returns:
- This document (used for fluent method chaining).
-
setVersion
Sets the entry's version.- Returns:
- This document (used for fluent method chaining).
-
isTransient
boolean isTransient()- Returns:
- true if the entry is transient, false otherwise.
-
setTransient
Sets whether or not the entry is transient.- Returns:
- This document (used for fluent method chaining).
-
containsProperty
Returns true if this document contains the specified property.- Parameters:
name- Name of property to look for.- Returns:
- Returns true if this document contains the specified property, false otherwise.
-
getProperty
Gets a property's value by its name. If the property does not exist in this document null is returned.- Parameters:
name- Name of property.- Returns:
- Value of property.
-
setProperty
Sets a property's value by its name. If the property is already defined in this document the existing value is overridden.- Parameters:
name- Name of propertyvalue- New value of property.- Returns:
- This document (used for fluent method chaining).
-
removeProperty
Removes the property from the document (if it exists).- Parameters:
name- Name of property to remove.- Returns:
- Previous value associated with specified property, or null if there was no such property.
-
getProperties
Returns an unmodifiable view of the document's properties. Attempts to modify the returned map, whether direct or via its collection views, result in an UnsupportedOperationException.- Returns:
- Reference to document's properties map.
-
addProperties
Adds the specified properties to the document's current properties.- Parameters:
properties- Properties to add.- Returns:
- This document (used for fluent method chaining).
-