Interface | Description |
---|---|
AssociationDao<LEFT,RIGHT> |
A DAO that can find and persist associations between entities.
|
Column<ENTITY,BUILDER> |
Represents a column in a table that holds entity values.
|
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 is an interface that allows basic, non-singular CRUD operations to be performed. |
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.
|
StatementPopulator |
Interface defining the ability to set the variables of a prepared statement.
|
Class | Description |
---|---|
AbstractColumn<TYPE,ENTITY,BUILDER> |
Represents a column in a database table.
|
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 . |
BooleanLongConverter |
This
Converter translates true values to 1 and false
values to 0. |
BooleanStringConverter |
This
Converter translates true values to "T" and false
values to "F". |
ChildrenDescriptor<PARENT,CHILD,PARENTBUILDER,CHILDBUILDER> |
Complete definition of how a child entity is related to its parent entity.
|
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. |
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.
|
DaoHelper |
Some small utilities used internally by hrorm.
|
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.
|
IndirectAssociationDaoBuilder<LEFT,LEFTBUILDER,RIGHT,RIGHTBUILDER> |
A mechanism for building an
AssociationDao for immutable
objects. |
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,PARENT,BUILDER,PARENTBUILDER> |
The
KeylessDao implementation. |
KeylessSqlBuilder<ENTITY> |
This class generates SQL strings suitable to be used in
PreparedStatement s used by KeylessDao s. |
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 allows in SQL where clauses. |
Order |
Describes how to order entities during select.
|
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. |
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.
|
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.