Class DbDataRecord
- java.lang.Object
-
- org.apache.jackrabbit.core.data.AbstractDataRecord
-
- org.apache.jackrabbit.core.data.db.DbDataRecord
-
- All Implemented Interfaces:
DataRecord
public class DbDataRecord extends AbstractDataRecord
Data record that is stored in a database
-
-
Field Summary
Fields Modifier and Type Field Description protected long
lastModified
protected long
length
protected DbDataStore
store
-
Constructor Summary
Constructors Constructor Description DbDataRecord(DbDataStore store, DataIdentifier identifier, long length, long lastModified)
Creates a data record based on the given identifier and length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastModified()
Returns the last modified of the record.long
getLength()
Returns the length of the binary stream in this record.InputStream
getStream()
Returns the the binary stream in this record.-
Methods inherited from class org.apache.jackrabbit.core.data.AbstractDataRecord
equals, getIdentifier, getReference, hashCode, toString
-
-
-
-
Field Detail
-
store
protected final DbDataStore store
-
length
protected final long length
-
lastModified
protected long lastModified
-
-
Constructor Detail
-
DbDataRecord
public DbDataRecord(DbDataStore store, DataIdentifier identifier, long length, long lastModified)
Creates a data record based on the given identifier and length.- Parameters:
identifier
- data identifierlength
- the lengthlastModified
-
-
-
Method Detail
-
getLength
public long getLength() throws DataStoreException
Returns the length of the binary stream in this record.- Returns:
- length of the binary stream
- Throws:
DataStoreException
- if the record could not be accessed
-
getStream
public InputStream getStream() throws DataStoreException
Returns the the binary stream in this record.- Returns:
- binary stream
- Throws:
DataStoreException
- if the record could not be accessed
-
getLastModified
public long getLastModified()
Returns the last modified of the record.- Returns:
- last modified time of the binary stream
-
-