Package org.ringojs.wrappers
Class Storable
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- org.ringojs.wrappers.Storable
-
- All Implemented Interfaces:
java.io.Serializable
,org.mozilla.javascript.ConstProperties
,org.mozilla.javascript.debug.DebuggableObject
,org.mozilla.javascript.Scriptable
,org.mozilla.javascript.SymbolScriptable
public class Storable extends org.mozilla.javascript.ScriptableObject
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Storable()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.mozilla.javascript.Scriptable
defineEntity(org.mozilla.javascript.Scriptable store, java.lang.String type, java.lang.Object mapping)
void
delete(java.lang.String name)
protected java.lang.Object
equivalentValues(java.lang.Object value)
Custom==
operator.java.lang.Object
get(java.lang.String name, org.mozilla.javascript.Scriptable start)
java.lang.String
getClassName()
java.lang.Object
getId()
java.lang.Object[]
getIds()
java.lang.Object
getKey()
java.lang.String
getType()
boolean
has(java.lang.String name, org.mozilla.javascript.Scriptable start)
void
jsremove(java.lang.Object transaction)
void
put(java.lang.String name, org.mozilla.javascript.Scriptable start, java.lang.Object value)
void
save(java.lang.Object transaction)
-
Methods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
Method Detail
-
defineEntity
@JSStaticFunction public static org.mozilla.javascript.Scriptable defineEntity(org.mozilla.javascript.Scriptable store, java.lang.String type, java.lang.Object mapping) throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
-
getClassName
public java.lang.String getClassName()
- Specified by:
getClassName
in interfaceorg.mozilla.javascript.Scriptable
- Specified by:
getClassName
in classorg.mozilla.javascript.ScriptableObject
-
equivalentValues
protected java.lang.Object equivalentValues(java.lang.Object value)
Custom==
operator. Must returnScriptable.NOT_FOUND
if this object does not have custom equality operator for the given value,Boolean.TRUE
if this object is equivalent tovalue
,Boolean.FALSE
if this object is not equivalent tovalue
. The default implementation returns Boolean.TRUE ifthis == value
orScriptable.NOT_FOUND
otherwise. It indicates that by default custom equality is available only ifvalue
isthis
in which case true is returned.- Overrides:
equivalentValues
in classorg.mozilla.javascript.ScriptableObject
-
save
@JSFunction public void save(java.lang.Object transaction)
-
jsremove
@JSFunction("remove") public void jsremove(java.lang.Object transaction)
-
getKey
@JSGetter("_key") public java.lang.Object getKey()
-
getId
@JSGetter("_id") public java.lang.Object getId()
-
has
public boolean has(java.lang.String name, org.mozilla.javascript.Scriptable start)
- Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classorg.mozilla.javascript.ScriptableObject
-
get
public java.lang.Object get(java.lang.String name, org.mozilla.javascript.Scriptable start)
- Specified by:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classorg.mozilla.javascript.ScriptableObject
-
put
public void put(java.lang.String name, org.mozilla.javascript.Scriptable start, java.lang.Object value)
- Specified by:
put
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
put
in classorg.mozilla.javascript.ScriptableObject
-
delete
public void delete(java.lang.String name)
- Specified by:
delete
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
delete
in classorg.mozilla.javascript.ScriptableObject
-
getIds
public java.lang.Object[] getIds()
- Specified by:
getIds
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
getIds
in classorg.mozilla.javascript.ScriptableObject
-
getType
public java.lang.String getType()
-
-