public final class CloudObject extends Object implements Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
ACCESS_APPLICATION
Deprecated.
An application visible/modifiable object!
|
static int |
ACCESS_APPLICATION_READ_ONLY
Deprecated.
An application scope readable object! Can only be modified by its creator
|
static int |
ACCESS_PRIVATE
Deprecated.
An object that can only be viewed or modified by its creator
|
static int |
ACCESS_PUBLIC
Deprecated.
A world visible/modifiable object!
|
static int |
ACCESS_PUBLIC_READ_ONLY
Deprecated.
A world visible object! Can only be modified by its creator.
|
static int |
BINDING_AUTO_SAVE
Deprecated.
Changes to the bound property will be reflected instantly into the cloud object and the object would
be saved immediately (not committed!).
|
static int |
BINDING_DEFERRED
Deprecated.
Changes to the bound property won't be reflected into the bound cloud object until commit binding is invoked
|
static int |
BINDING_IMMEDIATE
Deprecated.
Changes to the bound property will be reflected instantly into the cloud object
|
static int |
STATUS_COMMIT_IN_PROGRESS
Deprecated.
Indicates the state of the current object, an object in the process of committing
|
static int |
STATUS_COMMITTED
Deprecated.
Indicates the state of the current object, an object that is in sync with the database as far as
the client code is aware (the client code doesn't check!)
|
static int |
STATUS_DELETE_IN_PROGRESS
Deprecated.
Indicates the state of the current object, an object that is in the process of deletion
|
static int |
STATUS_DELETED
Deprecated.
Indicates the state of the current object, a deleted object
|
static int |
STATUS_MODIFIED
Deprecated.
Indicates the state of the current object, a locally modified object that wasn't committed yet
|
static int |
STATUS_NEW
Deprecated.
Indicates the state of the current object, a new object never persisted
|
static int |
STATUS_REFRESH_IN_PROGRESS
Deprecated.
Indicates the state of the current object, an object in the process of refresh
|
Constructor and Description |
---|
CloudObject()
Deprecated.
Default constructor for externalization purposes only!
|
CloudObject(String type)
Deprecated.
Constructor
|
CloudObject(String type,
int permissions)
Deprecated.
Create an object with different permissions settings
|
Modifier and Type | Method and Description |
---|---|
void |
bindProperty(Component cmp,
String propertyName,
String attributeName,
int defer,
boolean objectLead)
Deprecated.
Binds a property value within the given component to this cloud object, this means that
when the component changes the cloud object changes unless deferred.
|
void |
bindTree(Container ui,
int defer,
boolean objectLead)
Deprecated.
Binds a UI tree to the cloud object so its values automatically update in the cloud object
|
void |
cancelBinding()
Deprecated.
If deferred changes exist this method discards such values
|
void |
commitBinding()
Deprecated.
If deferred changes exist this method applies these changes to the data
|
boolean |
equals(Object o)
Deprecated.
Indicates whether some other object is "equal to" this one.
|
void |
externalize(DataOutputStream out)
Deprecated.
Allows us to store an object state, this method must be implemented
in order to save the state of an object
|
int |
getAccessPermissions()
Deprecated.
The access permissions for an object can only be changed for an object in which
the current user is the owner
|
Boolean |
getBoolean(String key)
Deprecated.
Returns the value for the given key
|
String |
getCloudId()
Deprecated.
The object id is a unique key that allows you to find an object that was persisted in the
store (a primary key).
|
Double |
getDouble(String key)
Deprecated.
Returns the value for the given key
|
Float |
getFloat(String key)
Deprecated.
Returns the value for the given key
|
Double |
getIndexDouble(int index)
Deprecated.
Returns the index value for the given index number
|
Long |
getIndexLong(int index)
Deprecated.
Returns the index value for the given index number
|
String |
getIndexString(int index)
Deprecated.
Returns the index value for the given index number
|
Integer |
getInteger(String key)
Deprecated.
Returns the value for the given key
|
long |
getLastModified()
Deprecated.
Indicates the last modification date for the object
|
Long |
getLong(String key)
Deprecated.
Returns the value for the given key
|
Object |
getObject(String key)
Deprecated.
Allows us to extract an object from the cloud object without knowing its type in advance
or whether it exists
|
String |
getObjectId()
Deprecated.
The object id must be unique, it is used to identify the object when loaded
even when it is obfuscated.
|
int |
getStatus()
Deprecated.
Returns one of the status constants in this class
|
String |
getString(String key)
Deprecated.
Returns the value for the given key
|
String |
getType()
Deprecated.
Returns the type of the object
|
int |
getVersion()
Deprecated.
Returns the version for the current persistance code, the version will be
pased to internalized thus allowing the internalize method to recognize
classes persisted in older revisions
|
int |
hashCode()
Deprecated.
Returns a hash code value for the object.
|
void |
internalize(int version,
DataInputStream in)
Deprecated.
Loads the object from the input stream and allows deserialization
|
boolean |
isOwner()
Deprecated.
Returns true if this object is owned by me or is world writeable
|
void |
remove(String key)
Deprecated.
Delete an entry within the object
|
void |
setBoolean(String key,
boolean value)
Deprecated.
Sets a value
|
void |
setBoolean(String key,
Boolean value)
Deprecated.
Sets a value
|
static void |
setCustomProperty(String key,
CustomProperty cp)
Deprecated.
Install a custom property on the given property name
|
void |
setDouble(String key,
double value)
Deprecated.
Sets a value
|
void |
setDouble(String key,
Double value)
Deprecated.
Sets a value
|
void |
setFloat(String key,
float value)
Deprecated.
Sets a value
|
void |
setFloat(String key,
Float value)
Deprecated.
Sets a value
|
void |
setIndexDouble(int index,
double value)
Deprecated.
Only indexed values can be queried and sorted
|
void |
setIndexLong(int index,
long value)
Deprecated.
Only indexed values can be queried and sorted
|
void |
setIndexString(int index,
String value)
Deprecated.
Only indexed values can be queried and sorted
|
void |
setInteger(String key,
int value)
Deprecated.
Sets a value
|
void |
setInteger(String key,
Integer value)
Deprecated.
Sets a value
|
void |
setLong(String key,
long value)
Deprecated.
Sets a value
|
void |
setLong(String key,
Long value)
Deprecated.
Sets a value
|
void |
setString(String key,
String value)
Deprecated.
Sets a value that can be no more than 512 characters
|
void |
setType(String type)
Deprecated.
Set the type of the object
|
void |
unbindProperty(Component cmp,
String propertyName)
Deprecated.
Releases the binding for the specific property name
|
void |
unbindTree(Container ui)
Deprecated.
Clears the binding to this component tree
|
public static final int STATUS_NEW
public static final int STATUS_COMMITTED
public static final int STATUS_MODIFIED
public static final int STATUS_COMMIT_IN_PROGRESS
public static final int STATUS_DELETE_IN_PROGRESS
public static final int STATUS_DELETED
public static final int STATUS_REFRESH_IN_PROGRESS
public static final int ACCESS_PUBLIC
public static final int ACCESS_PUBLIC_READ_ONLY
public static final int ACCESS_APPLICATION
public static final int ACCESS_APPLICATION_READ_ONLY
public static final int ACCESS_PRIVATE
public static final int BINDING_DEFERRED
public static final int BINDING_IMMEDIATE
public static final int BINDING_AUTO_SAVE
public CloudObject()
public CloudObject(String type)
type
- the type of the objectpublic CloudObject(String type, int permissions)
type
- the type of the objectpermissions
- one of the ACCESS_* valuespublic int getStatus()
public void setType(String type)
type
- the type of the fieldpublic String getType()
public void setIndexString(int index, String value)
index
- the index which must be a value between 1 and 10.value
- the value for the given indexpublic String getIndexString(int index)
index
- the index numberpublic void setIndexLong(int index, long value)
index
- the index which must be a value between 1 and 10.value
- the value for the given indexpublic Long getIndexLong(int index)
index
- the index numberpublic void setIndexDouble(int index, double value)
index
- the index which must be a value between 1 and 10.value
- the value for the given indexpublic Double getIndexDouble(int index)
index
- the index numberpublic boolean isOwner()
public String getCloudId()
public long getLastModified()
public Object getObject(String key)
key
- the key for the objectpublic static void setCustomProperty(String key, CustomProperty cp)
key
- the key on which to install the custom propertycp
- the custom property implementationpublic void setString(String key, String value)
key
- the key for the given valuevalue
- the valuepublic String getString(String key)
key
- the keypublic void remove(String key)
key
- the key to remove from the objectpublic void setLong(String key, long value)
key
- the key for the given valuevalue
- the valuepublic void setLong(String key, Long value)
key
- the key for the given valuevalue
- the valuepublic Long getLong(String key)
key
- the keypublic void setInteger(String key, int value)
key
- the key for the given valuevalue
- the valuepublic void setInteger(String key, Integer value)
key
- the key for the given valuevalue
- the valuepublic Integer getInteger(String key)
key
- the keypublic void setDouble(String key, double value)
key
- the key for the given valuevalue
- the valuepublic void setDouble(String key, Double value)
key
- the key for the given valuevalue
- the valuepublic Double getDouble(String key)
key
- the keypublic void setFloat(String key, float value)
key
- the key for the given valuevalue
- the valuepublic void setFloat(String key, Float value)
key
- the key for the given valuevalue
- the valuepublic Float getFloat(String key)
key
- the keypublic void setBoolean(String key, boolean value)
key
- the key for the given valuevalue
- the valuepublic void setBoolean(String key, Boolean value)
key
- the key for the given valuevalue
- the valuepublic Boolean getBoolean(String key)
key
- the keypublic int getVersion()
getVersion
in interface Externalizable
public void externalize(DataOutputStream out) throws IOException
externalize
in interface Externalizable
out
- the stream into which the object must be serializedIOException
- the method may throw an exceptionpublic String getObjectId()
Externalizable
getObjectId
in interface Externalizable
public void internalize(int version, DataInputStream in) throws IOException
internalize
in interface Externalizable
version
- the version the class returned during the externalization processsin
- the input stream used to load the classIOException
- the method may throw an exceptionpublic int getAccessPermissions()
public boolean equals(Object o)
public int hashCode()
public void bindTree(Container ui, int defer, boolean objectLead)
ui
- the component tree to binddefer
- bind settings whether to defer the binding which requires developers to explicitly commit
the binding to perform the changesobjectLead
- if set to true the UI property is initialized from values in the CloudObject, if false
the cloud object property is initialized from the UIpublic void unbindTree(Container ui)
ui
- the container whose children might be boundpublic void bindProperty(Component cmp, String propertyName, String attributeName, int defer, boolean objectLead)
cmp
- the component to bindpropertyName
- the name of the property in the bound componentattributeName
- the key within the cloud objectdefer
- bind settings whether to defer the binding which requires developers to explicitly commit
the binding to perform the changesobjectLead
- if set to true the UI property is initialized from values in the CloudObject, if false
the cloud object property is initialized from the UIpublic void unbindProperty(Component cmp, String propertyName)
cmp
- the componentpropertyName
- the name of the propertypublic void commitBinding()
public void cancelBinding()