A B C D E F G H I L M O P Q R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addConstraint(Class<E>, SqlPredicate<E>) - Static method in class com.github.collinalpert.java2db.queries.QueryConstraints
-
Adds a query constraint to a query made with a certain entity.
- any() - Method in class com.github.collinalpert.java2db.services.BaseService
-
Checks if a table has at least one row.
- any(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Checks if a value matching the condition exists in the table.
- ASCENDING - com.github.collinalpert.java2db.queries.OrderTypes
B
- BaseCodeAndDescriptionEntity - Class in com.github.collinalpert.java2db.entities
-
Describes an entity that has an id, a code and a description.
- BaseCodeAndDescriptionEntity() - Constructor for class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- BaseCodeAndDescriptionService<T extends BaseCodeAndDescriptionEntity> - Class in com.github.collinalpert.java2db.services
-
Describes a service class for an entity which contains an id, a code and a description.
- BaseCodeAndDescriptionService() - Constructor for class com.github.collinalpert.java2db.services.BaseCodeAndDescriptionService
- BaseEntity - Class in com.github.collinalpert.java2db.entities
-
Describes an entity that has an id.
- BaseEntity() - Constructor for class com.github.collinalpert.java2db.entities.BaseEntity
- BaseMapper<T extends BaseEntity> - Class in com.github.collinalpert.java2db.mappers
-
Default mapper for converting a
ResultSetto the respective Java entity. - BaseMapper(Class<T>) - Constructor for class com.github.collinalpert.java2db.mappers.BaseMapper
- BaseService<T extends BaseEntity> - Class in com.github.collinalpert.java2db.services
-
Class that provides base functionality for all service classes.
- BaseService() - Constructor for class com.github.collinalpert.java2db.services.BaseService
-
Constructor for the base class of all services.
C
- CacheablePaginationResult<T extends BaseEntity> - Class in com.github.collinalpert.java2db.paging
-
Extended class that adds caching functionality to the pagination implementation.
- CacheablePaginationResult(List<Query<T>>, Duration) - Constructor for class com.github.collinalpert.java2db.paging.CacheablePaginationResult
-
Constructor that allows the creation of a cached pagination.
- CachingModule<T> - Class in com.github.collinalpert.java2db.caching
-
A simple caching module, which is used for basic caching functionality.
- CachingModule() - Constructor for class com.github.collinalpert.java2db.caching.CachingModule
- close() - Method in class com.github.collinalpert.java2db.database.DBConnection
-
Closes the connection to the database.
- com.github.collinalpert.java2db.annotations - package com.github.collinalpert.java2db.annotations
- com.github.collinalpert.java2db.caching - package com.github.collinalpert.java2db.caching
- com.github.collinalpert.java2db.database - package com.github.collinalpert.java2db.database
- com.github.collinalpert.java2db.entities - package com.github.collinalpert.java2db.entities
- com.github.collinalpert.java2db.exceptions - package com.github.collinalpert.java2db.exceptions
- com.github.collinalpert.java2db.mappers - package com.github.collinalpert.java2db.mappers
- com.github.collinalpert.java2db.paging - package com.github.collinalpert.java2db.paging
- com.github.collinalpert.java2db.queries - package com.github.collinalpert.java2db.queries
- com.github.collinalpert.java2db.services - package com.github.collinalpert.java2db.services
- com.github.collinalpert.java2db.utilities - package com.github.collinalpert.java2db.utilities
- ConnectionFailedException - Exception in com.github.collinalpert.java2db.exceptions
- ConnectionFailedException() - Constructor for exception com.github.collinalpert.java2db.exceptions.ConnectionFailedException
- count() - Method in class com.github.collinalpert.java2db.services.BaseService
-
An overload of the
BaseService.count(SqlPredicate)method. - count(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Counts the rows that have an id (which should usually be every row) and match a certain condition.
- create(T) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates this Java entity on the database.
- createMultiple(List<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates multiple entities on the database.
- createMultiple(T...) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates a variable amount of entities on the database.
- createPagination(int) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates a pagination structure that splits the entire table into multiple pages.
- createPagination(int, Duration) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates a pagination structure that splits the entire table into multiple pages.
- createPagination(SqlPredicate<T>, int) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates a pagination structure that splits the result of a query into multiple pages.
- createPagination(SqlPredicate<T>, int, Duration) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Creates a cached pagination structure that splits the result of a query into multiple pages.
- createQuery() - Method in class com.github.collinalpert.java2db.services.BaseService
D
- DATABASE - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Specifies the name of the database to connect to.
- DBConnection - Class in com.github.collinalpert.java2db.database
- DBConnection() - Constructor for class com.github.collinalpert.java2db.database.DBConnection
- delete(long) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Deletes a row by an id.
- delete(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Deletes rows based on a condition.
- delete(T) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Deletes the corresponding row on the database.
- DESCENDING - com.github.collinalpert.java2db.queries.OrderTypes
E
- execute(String) - Method in class com.github.collinalpert.java2db.database.DBConnection
-
Executes a DQL statement on the database without Java parameters.
- execute(String, Object...) - Method in class com.github.collinalpert.java2db.database.DBConnection
-
Executes a DQL statement on the database with Java parameters.
F
- ForeignKeyEntity - Annotation Type in com.github.collinalpert.java2db.annotations
-
Marks a field as the correspondent object to a foreign key.
- ForeignKeyReference - Class in com.github.collinalpert.java2db.database
-
Describes a foreign key reference to a specific table.
- ForeignKeyReference(String, String, String, String) - Constructor for class com.github.collinalpert.java2db.database.ForeignKeyReference
G
- generate(String, String) - Static method in class com.github.collinalpert.java2db.utilities.UniqueIdentifier
-
Generates a unique alias from a base.
- getAlias() - Method in class com.github.collinalpert.java2db.database.ForeignKeyReference
- getAlias() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getAliasNotation() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getAll() - Method in class com.github.collinalpert.java2db.services.BaseService
- getAll(int) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Gets all values from the table but limits the result.
- getAll(SqlFunction<T, ?>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Gets all values from the table and orders them in an ascending order.
- getAll(SqlFunction<T, ?>, int) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Gets all values from the table, orders them in an ascending order and limits the result.
- getAll(SqlFunction<T, ?>, OrderTypes) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Gets all values from the table and orders them in the specified order.
- getAll(SqlFunction<T, ?>, OrderTypes, int) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Gets all values from the table, orders them in a specific order and limits the result.
- getAllFields(Class<? extends BaseEntity>) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
-
Gets all the fields and the fields of foreign key objects in this entity.
- getAllFields(Class<? extends BaseEntity>, String) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
-
Gets all the fields and the fields of foreign key objects in this entity.
- getByCode(String) - Method in class com.github.collinalpert.java2db.services.BaseCodeAndDescriptionService
- getByDescription(String) - Method in class com.github.collinalpert.java2db.services.BaseCodeAndDescriptionService
- getById(long) - Method in class com.github.collinalpert.java2db.services.BaseService
- getChildTable() - Method in class com.github.collinalpert.java2db.database.ForeignKeyReference
- getCode() - Method in class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- getColumn() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getConstraints(Class<E>) - Static method in class com.github.collinalpert.java2db.queries.QueryConstraints
-
Retrieves a composition
SqlPredicatefor all constraints that have been added for this class or any superclass of it. - getDescription() - Method in class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- getEntityFields(Class<? extends BaseEntity>) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
- getEntityFields(Class<? extends BaseEntity>, boolean) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
- getEntityFields(Class<? extends BaseEntity>, Class<?>) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
- getFirst() - Method in class com.github.collinalpert.java2db.queries.Query
-
Gets the first row of a query.
- getId() - Method in class com.github.collinalpert.java2db.entities.BaseEntity
- getIdentifier() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getIdentifier(String) - Static method in class com.github.collinalpert.java2db.utilities.UniqueIdentifier
-
Gets the alias for a certain nested property.
- getMultiple(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Retrieves list of entities which match the predicate.
- getNumberOfPages() - Method in class com.github.collinalpert.java2db.paging.PaginationResult
-
Gets the amount of pages created to split up a query.
- getOrAdd(String, Supplier<T>, Duration) - Method in class com.github.collinalpert.java2db.caching.CachingModule
-
Gets an entry from the cache, or creates it if it does not exist using the passed
valueFactory. - getPage(int) - Method in class com.github.collinalpert.java2db.paging.CacheablePaginationResult
-
Gets a page by its identifier, or rather its number, an returns it as a
List. - getPage(int) - Method in class com.github.collinalpert.java2db.paging.PaginationResult
-
Retrieves a specific page represented by a
List. - getPageAsStream(int) - Method in class com.github.collinalpert.java2db.paging.CacheablePaginationResult
-
Gets a page by its identifier, or rather its number, an returns it as a
Stream. - getPageAsStream(int) - Method in class com.github.collinalpert.java2db.paging.PaginationResult
-
Retrieves a specific page represented by a
Stream. - getParentClass() - Method in class com.github.collinalpert.java2db.database.ForeignKeyReference
- getParentForeignKey() - Method in class com.github.collinalpert.java2db.database.ForeignKeyReference
- getQuery() - Method in class com.github.collinalpert.java2db.queries.Query
- getReference() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getSingle(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Retrieves a single entity which matches the predicate.
- getSql() - Method in enum com.github.collinalpert.java2db.queries.OrderTypes
- getSQLNotation() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- getTableName(Class<?>) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
-
Gets the database table name from the
TableNameattribute on the class.
H
- HOST - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Specifies the hostname/ip address of the database.
I
- Ignore - Annotation Type in com.github.collinalpert.java2db.annotations
-
Maks a field as ignored meaning it does not exist on the database or should not be filled with values.
- IllegalEntityFieldAccessException - Exception in com.github.collinalpert.java2db.exceptions
-
An exception which occurs when Java2DB tries to access a field in an entity and fails.
- IllegalEntityFieldAccessException(String, String, String) - Constructor for exception com.github.collinalpert.java2db.exceptions.IllegalEntityFieldAccessException
- invalidate() - Method in class com.github.collinalpert.java2db.caching.CachingModule
-
Invalidates, or "clears", the contents of this cache.
- invalidate(String) - Method in class com.github.collinalpert.java2db.caching.CachingModule
-
Invalidates, or rather removes, a specific cache entry.
- invalidateCache(String) - Method in class com.github.collinalpert.java2db.paging.CacheablePaginationResult
-
Marks a specific value in the cache as invalid.
- invalidateCaches() - Method in class com.github.collinalpert.java2db.paging.CacheablePaginationResult
-
Marks the entire cache of the pagination as invalid, causing a reload the next time and value is requested.
- IoC - Class in com.github.collinalpert.java2db.utilities
-
An
- IoC() - Constructor for class com.github.collinalpert.java2db.utilities.IoC
- isForeignKey() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- isMapperRegistered(Class<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Checks if a mapper has already been registered.
- isOpen() - Method in class com.github.collinalpert.java2db.database.DBConnection
-
Determines if a connection to the database still exists or not.
- isServiceRegistered(Class<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Checks if a service has already been registered.
- isValid() - Method in class com.github.collinalpert.java2db.database.DBConnection
-
Checks if the connection is valid/successful.
L
- limit(int) - Method in class com.github.collinalpert.java2db.queries.Query
-
Limits the result of the rows returned to a maximum of the passed integer.
- limit(int, int) - Method in class com.github.collinalpert.java2db.queries.Query
-
Limits the result of the rows returned to a maximum of the passed integer with an offset.
- log(Object) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
-
Prints messages to the query, while considering the
DBConnection.LOG_QUERIESconstant. - LOG_QUERIES - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Constant which determines if the queries generated by Java2DB will be logged in the console.
- logf(String, Object...) - Static method in class com.github.collinalpert.java2db.utilities.Utilities
-
Prints formatted messages to the query, while considering the
DBConnection.LOG_QUERIESconstant.
M
- map(ResultSet) - Method in class com.github.collinalpert.java2db.mappers.BaseMapper
-
Maps a
ResultSetwith a single row to a Java entity. - map(ResultSet) - Method in interface com.github.collinalpert.java2db.mappers.Mapper
- Mapper<T extends BaseEntity> - Interface in com.github.collinalpert.java2db.mappers
- mapToList(ResultSet) - Method in class com.github.collinalpert.java2db.mappers.BaseMapper
-
Maps a
ResultSetwith multiple rows to a list of Java entities. - mapToList(ResultSet) - Method in interface com.github.collinalpert.java2db.mappers.Mapper
- mapToStream(ResultSet) - Method in class com.github.collinalpert.java2db.mappers.BaseMapper
-
Maps a
ResultSetwith multiple rows to aStreamof Java entities. - mapToStream(ResultSet) - Method in interface com.github.collinalpert.java2db.mappers.Mapper
O
- orderBy(SqlFunction<T, ?>) - Method in class com.github.collinalpert.java2db.queries.Query
-
Sets an ORDER BY clause for the DQL statement.
- orderBy(SqlFunction<T, ?>, OrderTypes) - Method in class com.github.collinalpert.java2db.queries.Query
-
Sets an ORDER BY clause for the DQL statement.
- OrderTypes - Enum in com.github.collinalpert.java2db.queries
-
An enum representing the sorting order possibilities in a DQL statement.
- orWhere(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.queries.Query
-
Sets or appends an OR WHERE clause to the DQL statement.
P
- PaginationResult<T extends BaseEntity> - Class in com.github.collinalpert.java2db.paging
-
Class for a simple pagination implementation.
- PaginationResult(List<Query<T>>) - Constructor for class com.github.collinalpert.java2db.paging.PaginationResult
- PASSWORD - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Specifies the password to log in on the database with.
- PORT - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Specifies the port to connect to the database on.
Q
- queries - Variable in class com.github.collinalpert.java2db.paging.PaginationResult
- Query<T extends BaseEntity> - Class in com.github.collinalpert.java2db.queries
-
A class representing a DQL statement with different options, including where clauses, order by clauses and limits.
- Query(Class<T>, Mapper<T>) - Constructor for class com.github.collinalpert.java2db.queries.Query
-
Constructor for creating a DQL statement for a given entity.
- QueryConstraints - Class in com.github.collinalpert.java2db.queries
-
A class which administers default query constraints set for entities.
- QueryConstraints() - Constructor for class com.github.collinalpert.java2db.queries.QueryConstraints
R
- registerMapper(Class<E>, M) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Registers an instance of a mapper class.
- registerService(Class<E>, S) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Registers an instance of a service class.
- resolve(Class<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Creates an instance of any class with an empty constructor.
- resolveMapper(Class<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Resolves a mapper class.
- resolveMapperOrElse(Class<E>, Mapper<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Resolves a mapper class.
- resolveService(Class<S>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Resolves a service class.
- resolveServiceByEntity(Class<E>) - Static method in class com.github.collinalpert.java2db.utilities.IoC
-
Resolves a service class by the entity it was registered with.
S
- setCode(String) - Method in class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- setDescription(String) - Method in class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- setId(long) - Method in class com.github.collinalpert.java2db.entities.BaseEntity
-
This setter only exists for frameworks like Spring, where a form needs to set this id.
T
- TableName - Annotation Type in com.github.collinalpert.java2db.annotations
-
Specifies the database table name for an entity.
- TableNameColumnReference - Class in com.github.collinalpert.java2db.database
-
Describes a column and its table name so they can be referenced together.
- TableNameColumnReference(String, Field, String, String) - Constructor for class com.github.collinalpert.java2db.database.TableNameColumnReference
- toList() - Method in class com.github.collinalpert.java2db.queries.Query
-
Executes the query and returns the result as a
List - toStream() - Method in class com.github.collinalpert.java2db.queries.Query
-
Executes the query and returns the result as a
Stream - toString() - Method in class com.github.collinalpert.java2db.database.TableNameColumnReference
- toString() - Method in class com.github.collinalpert.java2db.entities.BaseCodeAndDescriptionEntity
- toString() - Method in class com.github.collinalpert.java2db.entities.BaseEntity
- toString() - Method in class com.github.collinalpert.java2db.queries.Query
U
- UniqueIdentifier - Class in com.github.collinalpert.java2db.utilities
-
A factory class for generating unique identifiers.
- UniqueIdentifier() - Constructor for class com.github.collinalpert.java2db.utilities.UniqueIdentifier
- unset() - Static method in class com.github.collinalpert.java2db.utilities.UniqueIdentifier
-
Resets the values in this class.
- update(long, SqlFunction<T, R>, R) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Updates a specific column for a record in a table.
- update(String) - Method in class com.github.collinalpert.java2db.database.DBConnection
-
This command is used for any DDL/DML queries.
- update(String, Object...) - Method in class com.github.collinalpert.java2db.database.DBConnection
-
This command is used for any DDL/DML queries with Java parameters.
- update(T) - Method in class com.github.collinalpert.java2db.services.BaseService
-
Updates this entity's row on the database.
- USERNAME - Static variable in class com.github.collinalpert.java2db.database.DBConnection
-
Specifies the username to log in on the database with.
- Utilities - Class in com.github.collinalpert.java2db.utilities
- Utilities() - Constructor for class com.github.collinalpert.java2db.utilities.Utilities
V
- value() - Method in annotation type com.github.collinalpert.java2db.annotations.ForeignKeyEntity
- value() - Method in annotation type com.github.collinalpert.java2db.annotations.TableName
- valueOf(String) - Static method in enum com.github.collinalpert.java2db.queries.OrderTypes
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.github.collinalpert.java2db.queries.OrderTypes
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- where(SqlPredicate<T>) - Method in class com.github.collinalpert.java2db.queries.Query
-
Sets or appends a WHERE clause for the DQL statement.
All Classes All Packages