From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../SyntheticStorableReferenceBuilder.html | 727 +++++++++++++++++++++ 1 file changed, 727 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.html (limited to 'apidocs/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.html') diff --git a/apidocs/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.html b/apidocs/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.html new file mode 100644 index 0000000..75ec3d5 --- /dev/null +++ b/apidocs/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.html @@ -0,0 +1,727 @@ + + + + + + +SyntheticStorableReferenceBuilder (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.synthetic
+

Class SyntheticStorableReferenceBuilder<S extends Storable>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    SyntheticBuilder
    +
    +
    +
    +
    public class SyntheticStorableReferenceBuilder<S extends Storable>
    +extends java.lang.Object
    +implements SyntheticBuilder
    +
    A SyntheticStorableReference defines new kinds of Storables from an existing + master storable. This is used in situations when additional information about + a storable needs to be tracked -- eg, for an index, or for caching. The + storable may optionally have completely new, synthetic properties added. + +

    + All primary key properties of the master storable will also be provided by the + derived storable. Three special methods will be provided: +

      +
    • getMaster - retrieves the original storable
    • +
    • setAllProperties - sets the properties the syntheticReference has in + common with the master to the values of the master instance
    • +
    • isConsistent - verifies that the properties the syntheticReference has + in common with the master are consistent with an instance of the master, + meaning that they are in the same state and, if set, equal.
    • +
    +
    Author:
    +
    Brian S O'Neill, Don Schneider, David Rosenstrauch
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SyntheticStorableReferenceBuilder

        +
        public SyntheticStorableReferenceBuilder(java.lang.Class<S> storableClass,
        +                                 boolean isUnique)
        +
        Parameters:
        storableClass - class of the storable that will be referenced by this + synthetic. The name for the synthetic storable will be based + on this class's name, decorated with the properties which + participate in the primary key for the synthetic storable.
        +
      • +
      + + + +
        +
      • +

        SyntheticStorableReferenceBuilder

        +
        public SyntheticStorableReferenceBuilder(java.lang.Class<S> storableClass,
        +                                 java.lang.String baseName,
        +                                 boolean isUnique)
        +
        Parameters:
        storableClass - class of the storable that will be referenced by this + synthetic
        baseName - of the generated synthetic. Note that for some repositories + this name will be visible across the entire repository, so it + is good practice to include namespace information to guarantee + uniqueness.
        isUnique - true if the properties that are explicitly identified as primary + key properites are sufficient to uniquely identify the index object.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getReferenceAccess

        +
        public SyntheticStorableReferenceAccess<S> getReferenceAccess()
        +
        Build and return access to the generated storable reference class.
        +
        Since:
        +
        1.2.1
        +
      • +
      + + + +
        +
      • +

        getStorableClass

        +
        public java.lang.Class<? extends Storable> getStorableClass()
        +                                                     throws java.lang.IllegalStateException
        +
        +
        Specified by:
        +
        getStorableClass in interface SyntheticBuilder
        +
        Returns:
        the generated class file for this builder. Note that + proper operation requires that SyntheticBuilder.prepare() already have been called + prior to calling this method.
        +
        Throws:
        +
        java.lang.IllegalStateException - if build has not yet been called.
        +
      • +
      + + + + + + + +
        +
      • +

        addKeyProperty

        +
        public SyntheticProperty addKeyProperty(java.lang.String name,
        +                               Direction direction)
        +
        Add a property to the primary key which is a member of the Storable type + being referenced by this one.
        +
        Parameters:
        name -
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        hasProperty

        +
        public boolean hasProperty(java.lang.String name)
        +
        Description copied from interface: SyntheticBuilder
        +
        Check to see if a particular property has already been added to the list of + properties to generate
        +
        +
        Specified by:
        +
        hasProperty in interface SyntheticBuilder
        +
        +
      • +
      + + + +
        +
      • +

        getUserProps

        +
        public java.util.List<SyntheticProperty> getUserProps()
        +
        Returns:
        Returns the indexProps.
        +
      • +
      + + + +
        +
      • +

        addPrimaryKey

        +
        public SyntheticKey addPrimaryKey()
        +
        Description copied from interface: SyntheticBuilder
        +
        Add a primary key to be built.
        +
        +
        Specified by:
        +
        addPrimaryKey in interface SyntheticBuilder
        +
        Returns:
        key to be decorated with property values defining the primary key
        +
      • +
      + + + +
        +
      • +

        addAlternateKey

        +
        public SyntheticKey addAlternateKey()
        +
        Description copied from interface: SyntheticBuilder
        +
        Add an alternate key to be built.
        +
        +
        Specified by:
        +
        addAlternateKey in interface SyntheticBuilder
        +
        Returns:
        key to be decorated with property values defining the alternate key
        +
      • +
      + + + +
        +
      • +

        addIndex

        +
        public SyntheticIndex addIndex()
        +
        Description copied from interface: SyntheticBuilder
        +
        Add an index to the set managed by this builder. All indexes added this + way will be in addition to the primary and alternate key indexes.
        +
        +
        Specified by:
        +
        addIndex in interface SyntheticBuilder
        +
        Returns:
        index to be decorated with property values defining the index
        +
      • +
      + + + +
        +
      • +

        getName

        +
        public java.lang.Object getName()
        +
      • +
      + + + +
        +
      • +

        isUnique

        +
        public boolean isUnique()
        +
        True if the generated derived class should be considered unique. If + non-unique, all properties are added to the primary key so there will be + no conflicts between various derived classes derived from the same base + storable.
        +
      • +
      + + + +
        +
      • +

        isVersioned

        +
        public boolean isVersioned()
        +
        Description copied from interface: SyntheticBuilder
        +
        Returns true if a property with the version attribute has been addded
        +
        +
        Specified by:
        +
        isVersioned in interface SyntheticBuilder
        +
        +
      • +
      + + + + + +
        +
      • +

        copyToMasterPrimaryKey

        +
        @Deprecated
        +public void copyToMasterPrimaryKey(Storable indexEntry,
        +                                     S master)
        +                            throws FetchException
        +
        Deprecated. call getReferenceAccess
        +
        Sets all the primary key properties of the given master, using the + applicable properties of the given index entry.
        +
        Parameters:
        indexEntry - source of property values
        master - master whose primary key properties will be set
        +
        Throws:
        +
        FetchException
        +
      • +
      + + + + + +
        +
      • +

        copyFromMaster

        +
        @Deprecated
        +public void copyFromMaster(Storable indexEntry,
        +                             S master)
        +                    throws FetchException
        +
        Deprecated. call getReferenceAccess
        +
        Sets all the properties of the given index entry, using the applicable + properties of the given master.
        +
        Parameters:
        indexEntry - index entry whose properties will be set
        master - source of property values
        +
        Throws:
        +
        FetchException
        +
      • +
      + + + + + +
        +
      • +

        isConsistent

        +
        @Deprecated
        +public boolean isConsistent(Storable indexEntry,
        +                              S master)
        +                     throws FetchException
        +
        Deprecated. call getReferenceAccess
        +
        Returns true if the properties of the given index entry match those + contained in the master, excluding any version property. This will + always return true after a call to copyFromMaster.
        +
        Parameters:
        indexEntry - index entry whose properties will be tested
        master - source of property values
        +
        Throws:
        +
        FetchException
        +
      • +
      + + + +
        +
      • +

        getComparator

        +
        @Deprecated
        +public java.util.Comparator<? extends Storable> getComparator()
        +
        Deprecated. call getReferenceAccess
        +
        Returns a comparator for ordering index entries.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3