Module storm

Class RefFactoryImpl

java.lang.Object
st.orm.template.impl.RefFactoryImpl
All Implemented Interfaces:
RefFactory

public final class RefFactoryImpl extends Object implements RefFactory
Implementation of RefFactory.
Since:
1.3
  • Constructor Details

  • Method Details

    • create

      public <T extends Record, ID> Ref<T> create(@Nonnull Class<T> type, @Nonnull ID pk)
      Creates a ref instance for the specified record type and pk. This method can be used to generate ref instances for entities, projections and regular records.
      Specified by:
      create in interface RefFactory
      Type Parameters:
      T - record type.
      ID - primary key type.
      Parameters:
      type - record type.
      pk - primary key.
      Returns:
      ref instance.
    • create

      public <T extends Record, ID> Ref<T> create(@Nonnull T record, @Nonnull ID pk)
      Creates a ref instance for the specified record, type and pk. This method can be used to generate ref instances for entities, projections and regular records. The object returned by this method already contains the fetched record.
      Specified by:
      create in interface RefFactory
      Type Parameters:
      T - record type.
      ID - primary key type.
      Parameters:
      pk - primary key.
      Returns:
      ref instance.