Interface | Description |
---|---|
AssociationDao<LEFT,RIGHT> |
A DAO that can find and persist associations between entities.
|
Column<DBTYPE,CLASSTYPE,ENTITY,BUILDER> |
Represents a means for reading or writing a value of a column
on a database table for a particular entity class.
|
Converter<CLASS,CODE> |
This interface describes mechanisms for translating objects from one
type to another and back.
|
Dao<ENTITY> |
A
Dao is an interface that allows basic CRUD operations to be performed. |
DaoDescriptor<ENTITY,ENTITYBUILDER> |
Implementers of this interface completely describe all the information
necessary to persisting objects of type
ENTITY . |
KeylessDao<ENTITY> |
A
KeylessDao supports some operations for inserting
and selecting records in a database. |
KeylessDaoDescriptor<ENTITY,ENTITYBUILDER> |
Implementers of this interface completely describe all the information
necessary to persisting objects of type
ENTITY , except for
the primary key. |
ParentColumn<CHILD,PARENT,CHILDBUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent.
|
PrimaryKey<ENTITY,BUILDER> |
Representation of the column that holds the primary key for the entity.
|
Queries |
Represents the generated SQL for doing CRUD operations on some entity.
|
ResultSetReader<TYPE> |
An interface representing a function that can read a value out
of a
java.sql.ResultSet . |
SchemaDescriptor<ENTITY,BUILDER> |
Defines a class that can be used to build a richer schema than a
DaoDescriptor or KeylessDaoDescriptor . |
StatementPopulator |
Interface defining the ability to set the variables of a prepared statement.
|
Class | Description |
---|---|
AbstractDao<ENTITY,BUILDER> |
An abstract class that aids in creating full
Dao
implementations. |
Association<LEFT,RIGHT> |
A simple tuple class that binds two objects.
|
AssociationDaoBuilder<LEFT,RIGHT> |
A mechanism for building an
AssociationDao . |
AssociationDaoImpl<LEFT,LEFTBUILDER,RIGHT,RIGHTBUILDER> |
Implementation of the
AssociationDao . |
ChildrenDescriptor<PARENT,CHILD,PARENTBUILDER,CHILDBUILDER> |
Complete definition of how a child entity is related to its parent entity.
|
ColumnCollection<ENTITY,BUILDER> |
Collator for the columns in a DAO builder.
|
ColumnImpl<DBTYPE,CLASSTYPE,ENTITY,BUILDER> |
A basic implementation of the
Column interface for data elements. |
ColumnSelection<ENTITY,BUILDER> |
Represents a sub set of columns that are relevant to a particular query.
|
ColumnTypes |
Container for some static data regarding what
Column implementations are
suitable for what SQL types. |
Converters |
Some
Converter implementations and factory methods. |
DaoBuilder<ENTITY> |
A DaoBuilder provides mechanisms for defining the relationship between
a Java type and the table(s) that will persist the data held in the class.
|
DaoBuilderHelper<ENTITY,BUILDER> |
A value class for storing meta data (like table name) about an entity.
|
DaoImpl<ENTITY,PARENT,BUILDER,PARENTBUILDER> |
The
Dao implementation. |
DataColumnFactory |
Mechanisms for creating columns that can handle persistence of various Java types.
|
DirectPrimaryKey<ENTITY> |
Primary key for an entity whose construction is direct, i.e.
|
Envelope<T> |
A simple holder for data objects that can package
it with its own ID.
|
GenericColumn<TYPE> |
A representation of a database column that directly persists a particular Java type.
|
IndirectDaoBuilder<ENTITY,BUILDER> |
An
IndirectDaoBuilder is used for times when the class representing
the persisted entity is immutable. |
IndirectKeylessDaoBuilder<ENTITY,BUILDER> |
An
IndirectKeylessDaoBuilder provides mechanisms for defining the relationship between
a Java type and the table that backs it. |
IndirectPrimaryKey<ENTITY,BUILDER> |
Primary key for an entity whose construction is indirect, i.e.
|
JoinColumn<ENTITY,JOINED,ENTITYBUILDER,JOINEDBUILDER> |
Represents a column that links to a foreign key of some
other entity.
|
KeylessDaoImpl<ENTITY,BUILDER> |
The
KeylessDao implementation. |
KeylessValidator |
A utility for checking whether or not the configuration of a
KeylessDao
matches the database schema. |
NoBackReferenceParentColumn<ENTITY,PARENT,BUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent where the
child class has no reference to the parent.
|
Operator |
The
Operator type supports the generation of SQL statements
that specify the various comparisons allowed in SQL where clauses. |
Order |
Describes how to order entities during select.
|
Pair<T,U> |
Represents a two-tuple of objects.
|
ParentColumnImpl<CHILD,PARENT,CHILDBUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent where
the child class has a pointer back to the parent.
|
PopulateResult |
Indication of the result, and work remaining, after an item has been populated.
|
Prefixer |
Utility for providing unique prefixes in a fixed pattern.
|
RelativeDaoDescriptor<ENTITY,PARENT,ENTITYBUILDER> |
An implementation of a
DaoDescriptor that has its
prefixes shifted. |
Schema |
The
Schema class can be used to generate SQL to
create tables, sequences, and constraints described by
KeylessDaoDescriptor objects. |
SqlBuilder<ENTITY> |
This class generates SQL strings suitable to be used in
PreparedStatement s. |
SqlFunction |
Representation of various aggregation functions that a database can perform.
|
SqlRunner<ENTITY,BUILDER> |
This class does the heavy lifting of creating
Statement s,
executing SQL, and parsing ResultSet s. |
Transactor |
An aid for managing transactions.
|
Triplet<T,U,V> |
Represents a three-tuple of objects.
|
Validator |
A utility for checking whether or not the configuration of a
Dao
matches the database schema. |
Where |
Representation of a SQL where clause: a possibly nested list of
predicates that describes which records in the database to match.
|
WherePredicate<T> |
Represents a particular predicate for filtering results.
|
WherePredicateTree |
A very simple syntax tree for representing where clauses with possibly
nested predicates joined by AND and OR.
|
Enum | Description |
---|---|
WherePredicateTree.Conjunction |
Exception | Description |
---|---|
HrormException |
A
RuntimeException that often wraps SQLException . |
Hrorm provides a mechanism for building Dao
objects.
Hrorm Dao
objects support
basic CRUD operations on a relational (SQL) database: insert
,
select
, update
, and delete
.
Dao
objects are created by using a DaoBuilder
or
IndirectDaoBuilder
. These classes
provide a simple, declarative, fluent interface for describing the relationship between
the Java object to be persisted and the underlying schema that supports it.
While almost all the classes and methods in this package are public, there is little need to
use them directly. Other than the DaoBuilder
,
Dao
, HrormException
, Where
, and a few others
most clients should not have to directly reference anything in this package.
Hrorm intentionally converts all checked SQLException
instances that arise to
HrormException
which extends RuntimeException
in its
client interfaces. Of course,
proper exception handling is essential to a sound persistence policy in an application,
regardless of whether the particular exceptions are checked or unchecked.
Copyright © 2019. All rights reserved.