Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

        org.mozilla.javascript.ScriptableObject.KeyComparator
    • Field Summary

      • Fields inherited from class org.mozilla.javascript.ScriptableObject

        CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
      • Fields inherited from interface org.mozilla.javascript.Scriptable

        NOT_FOUND
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Storable

        public Storable()
    • 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 interface org.mozilla.javascript.Scriptable
        Specified by:
        getClassName in class org.mozilla.javascript.ScriptableObject
      • equivalentValues

        protected java.lang.Object equivalentValues​(java.lang.Object value)
        Custom == operator. Must return Scriptable.NOT_FOUND if this object does not have custom equality operator for the given value, Boolean.TRUE if this object is equivalent to value, Boolean.FALSE if this object is not equivalent to value. The default implementation returns Boolean.TRUE if this == value or Scriptable.NOT_FOUND otherwise. It indicates that by default custom equality is available only if value is this in which case true is returned.
        Overrides:
        equivalentValues in class org.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 interface org.mozilla.javascript.Scriptable
        Overrides:
        has in class org.mozilla.javascript.ScriptableObject
      • get

        public java.lang.Object get​(java.lang.String name,
                                    org.mozilla.javascript.Scriptable start)
        Specified by:
        get in interface org.mozilla.javascript.Scriptable
        Overrides:
        get in class org.mozilla.javascript.ScriptableObject
      • put

        public void put​(java.lang.String name,
                        org.mozilla.javascript.Scriptable start,
                        java.lang.Object value)
        Specified by:
        put in interface org.mozilla.javascript.Scriptable
        Overrides:
        put in class org.mozilla.javascript.ScriptableObject
      • delete

        public void delete​(java.lang.String name)
        Specified by:
        delete in interface org.mozilla.javascript.Scriptable
        Overrides:
        delete in class org.mozilla.javascript.ScriptableObject
      • getIds

        public java.lang.Object[] getIds()
        Specified by:
        getIds in interface org.mozilla.javascript.Scriptable
        Overrides:
        getIds in class org.mozilla.javascript.ScriptableObject
      • getType

        public java.lang.String getType()