Class ORM

java.lang.Object
com.aashish.javaormashcode.api.ORM

public final class ORM extends Object
  • Method Details

    • of

      public static <T> QuerySet<T> of(Class<T> modelClass)
      Creates a query builder for the given model class.
    • setPrimaryDataSource

      public static void setPrimaryDataSource(DataSource dataSource)
      Registers the default data source used when queries do not provide one explicitly.
    • openSession

      public static OrmSession openSession()
      Opens a session backed by the configured primary data source.
    • openSession

      public static OrmSession openSession(DataSource dataSource)
      Opens a session backed by the given data source.
    • field

      public static <T, V> FieldRef<T,V> field(String path)
      Creates a reusable field reference for selections, filters, and ordering.