Class EntityFlags


  • public final class EntityFlags
    extends java.lang.Object
    Not really an enum, but binary flags to use across languages
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SHARED_GLOBAL_IDS
      Makes object IDs for a synced types (SYNC_ENABLED is set) global.
      static int SYNC_ENABLED
      Enable "data synchronization" for this entity type: objects will be synced with other stores over the network.
      static int USE_NO_ARG_CONSTRUCTOR
      Use the default (no arguments) constructor to create entities
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private EntityFlags()  
    • Method Summary

      • Methods inherited from class java.lang.Object

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

      • USE_NO_ARG_CONSTRUCTOR

        public static final int USE_NO_ARG_CONSTRUCTOR
        Use the default (no arguments) constructor to create entities
        See Also:
        Constant Field Values
      • SYNC_ENABLED

        public static final int SYNC_ENABLED
        Enable "data synchronization" for this entity type: objects will be synced with other stores over the network. It's possible to have local-only (non-synced) types and synced types in the same store (schema/data model).
        See Also:
        Constant Field Values
      • SHARED_GLOBAL_IDS

        public static final int SHARED_GLOBAL_IDS
        Makes object IDs for a synced types (SYNC_ENABLED is set) global. By default (not using this flag), the 64 bit object IDs have a local scope and are not unique globally. This flag tells ObjectBox to treat object IDs globally and thus no ID mapping (local <-> global) is performed. Often this is used with assignable IDs (ID_SELF_ASSIGNABLE property flag is set) and some special ID scheme. Note: typically you won't do this with automatically assigned IDs, set by the local ObjectBox store. Two devices would likely overwrite each other's object during sync as object IDs are prone to collide. It might be OK if you can somehow ensure that only a single device will create new IDs.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EntityFlags

        private EntityFlags()