Class HibernateProvider.Default
java.lang.Object
one.microstream.afs.jpa.hibernate.HibernateProvider.Default
- All Implemented Interfaces:
AutoCloseable
,HibernateProvider
,SqlProvider
- Enclosing interface:
- HibernateProvider
public static class HibernateProvider.Default extends Object implements HibernateProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.jpa.hibernate.HibernateProvider
HibernateProvider.Default
Nested classes/interfaces inherited from interface one.microstream.afs.sql.SqlProvider
SqlProvider.Abstract
-
Field Summary
Fields inherited from interface one.microstream.afs.sql.SqlProvider
DATA_COLUMN_NAME, DATA_COLUMN_TYPE, END_COLUMN_NAME, END_COLUMN_TYPE, IDENTIFIER_COLUMN_LENGTH, IDENTIFIER_COLUMN_NAME, IDENTIFIER_COLUMN_TYPE, START_COLUMN_NAME, START_COLUMN_TYPE
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description String
catalog()
void
close()
String
copyFileQuery(String sourceTableName, String targetTableName)
insert into [targetTableName] ('identifier', 'start', 'end', 'data') select ?, 'start', 'end', 'data' from [sourceTableName] where 'identifier' = ?Iterable<String>
createDirectoryQueries(String tableName)
create table [tableName] ( 'identifier' varchar(IDENTIFIER_COLUMN_LENGTH) not null, 'start' bigint not null, 'end' bigint not null, 'blob' not null, primary key ('identifier', 'start') )String
deleteFileQuery(String tableName)
delete from [tableName] where 'identifier' = ?String
deleteFileQueryFromEnd(String tableName)
delete from [tableName] where 'identifier' = ? and 'end' >= ?String
deleteFileQueryFromStart(String tableName)
delete from [tableName] where 'identifier' = ? and 'start' >= ?javax.persistence.EntityManager
entityManager()
<T> T
execute(SqlOperation<T> operation)
String
fileExistsQuery(String tableName)
select count(*) from [tableName] where 'identifier' = ?String
fileSizeQuery(String tableName)
select count(*), max('end') from [tableName] where 'identifier' = ?String
listFilesQuery(String tableName)
select distinct 'identifier' from [tableName]String
moveFileQuerySameParent(String tableName)
update [tableName] set 'identifier' = ? where 'identifier' = ?Set<String>
queryDirectories(Connection connection, String prefix)
boolean
queryDirectoryExists(Connection connection, String tableName)
String
readDataQuery(String tableName)
select from [tableName] where 'identifier' = ? order by 'end' descString
readDataQueryWithLength(String tableName)
select from [tableName] where 'identifier' = ? and 'start' < ? order by 'end' descString
readDataQueryWithOffset(String tableName)
select from [tableName] where 'identifier' = ? and 'end' >= ? order by 'end' descString
readDataQueryWithRange(String tableName)
select from [tableName] where 'identifier' = ? and 'end' >= ? and 'start' <= ? order by 'end' descString
readMetadataQuery(String tableName)
select 'start', 'end' from [tableName] where 'identifier' = ?String
readMetadataQuerySingleSegment(String tableName)
select 'start', 'end' from [tableName] where 'identifier' = ? and start <= ? and end >= ?String
schema()
void
setBlob(PreparedStatement statement, int index, InputStream inputStream, long length)
String
writeDataQuery(String tableName)
insert into [tableName] ('identifier', 'start', 'end', 'data') values (?, ?, ?, ?)
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
entityManager
public javax.persistence.EntityManager entityManager()- Specified by:
entityManager
in interfaceHibernateProvider
-
catalog
- Specified by:
catalog
in interfaceSqlProvider
-
schema
- Specified by:
schema
in interfaceSqlProvider
-
execute
- Specified by:
execute
in interfaceSqlProvider
-
setBlob
public void setBlob(PreparedStatement statement, int index, InputStream inputStream, long length) throws SQLException- Specified by:
setBlob
in interfaceSqlProvider
- Throws:
SQLException
-
queryDirectoryExists
- Specified by:
queryDirectoryExists
in interfaceSqlProvider
- Throws:
SQLException
-
queryDirectories
- Specified by:
queryDirectories
in interfaceSqlProvider
- Throws:
SQLException
-
fileSizeQuery
Description copied from interface:SqlProvider
select count(*), max('end') from [tableName] where 'identifier' = ?
- Specified by:
fileSizeQuery
in interfaceSqlProvider
-
listFilesQuery
Description copied from interface:SqlProvider
select distinct 'identifier' from [tableName]
- Specified by:
listFilesQuery
in interfaceSqlProvider
-
readMetadataQuery
Description copied from interface:SqlProvider
select 'start', 'end' from [tableName] where 'identifier' = ?
- Specified by:
readMetadataQuery
in interfaceSqlProvider
-
readMetadataQuerySingleSegment
Description copied from interface:SqlProvider
select 'start', 'end' from [tableName] where 'identifier' = ? and start <= ? and end >= ?
- Specified by:
readMetadataQuerySingleSegment
in interfaceSqlProvider
-
readDataQuery
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? order by 'end' desc
- Specified by:
readDataQuery
in interfaceSqlProvider
-
readDataQueryWithLength
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'start' < ? order by 'end' desc
- Specified by:
readDataQueryWithLength
in interfaceSqlProvider
-
readDataQueryWithOffset
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'end' >= ? order by 'end' desc
- Specified by:
readDataQueryWithOffset
in interfaceSqlProvider
-
readDataQueryWithRange
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'end' >= ? and 'start' <= ? order by 'end' desc
- Specified by:
readDataQueryWithRange
in interfaceSqlProvider
-
fileExistsQuery
Description copied from interface:SqlProvider
select count(*) from [tableName] where 'identifier' = ?
- Specified by:
fileExistsQuery
in interfaceSqlProvider
-
createDirectoryQueries
Description copied from interface:SqlProvider
create table [tableName] ( 'identifier' varchar(IDENTIFIER_COLUMN_LENGTH) not null, 'start' bigint not null, 'end' bigint not null, 'blob' not null, primary key ('identifier', 'start') )
- Specified by:
createDirectoryQueries
in interfaceSqlProvider
-
deleteFileQuery
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ?
- Specified by:
deleteFileQuery
in interfaceSqlProvider
-
deleteFileQueryFromStart
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ? and 'start' >= ?
- Specified by:
deleteFileQueryFromStart
in interfaceSqlProvider
-
deleteFileQueryFromEnd
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ? and 'end' >= ?
- Specified by:
deleteFileQueryFromEnd
in interfaceSqlProvider
-
writeDataQuery
Description copied from interface:SqlProvider
insert into [tableName] ('identifier', 'start', 'end', 'data') values (?, ?, ?, ?)
- Specified by:
writeDataQuery
in interfaceSqlProvider
-
moveFileQuerySameParent
Description copied from interface:SqlProvider
update [tableName] set 'identifier' = ? where 'identifier' = ?
- Specified by:
moveFileQuerySameParent
in interfaceSqlProvider
-
copyFileQuery
Description copied from interface:SqlProvider
insert into [targetTableName] ('identifier', 'start', 'end', 'data') select ?, 'start', 'end', 'data' from [sourceTableName] where 'identifier' = ?
- Specified by:
copyFileQuery
in interfaceSqlProvider
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceHibernateProvider
-