Class JDB2Manager
java.lang.Object
com.pnfsoftware.jeb.core.dao.impl.JDB2Manager
- All Implemented Interfaces:
IFileDatabase
JEB database file ("*.jdb2") manager.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
JEB database file extension with the Leading dot.static final int
This flags is used to specify that the record should be compressedstatic final int
The record should be accompanied by a CRC32 value to verify its basic integritystatic final int
This flags is used to specify that the record should be encryptedstatic final int
No flagstatic final int
File header marker, little-endian:JDB2
static final int
Artifacts collections, little-endian:ART
static final int
Project block marker, little-endian:PRJ
static final int
Persisted Project Configuration:PPC
static final int
Persisted Project Metadata:PPM
static final int
Quick-states
block marker, little-endian:QCK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteFile
(String key) Delete a file.getDatabaseReader
(String key) Get a database record reader.getDatabaseWriter
(String key) Get a database record writer.getFileObject
(String key) Attempt to get the filesystem object backing this db file entry.getFileReader
(String key) Get an input stream reader for low-level reading from a file.getFileWriter
(String key) Get an output stream reader for low-level writing to a file.boolean
Determine if the database contains the given file (the file must exist).byte[]
DO NOT USE! PROJECT record only, old format!static String
projectTypeToName
(int type) boolean
DO NOT USE! PROJECT record only, old format!
-
Field Details
-
EXTENSION
JEB database file extension with the Leading dot. The case matters.- See Also:
-
MARKER
public static final int MARKERFile header marker, little-endian:JDB2
- See Also:
-
TYPE_PROJECT
public static final int TYPE_PROJECTProject block marker, little-endian:PRJ
- See Also:
-
TYPE_QSTATES
public static final int TYPE_QSTATESQuick-states
block marker, little-endian:QCK
- See Also:
-
TYPE_ARTIFACTS
public static final int TYPE_ARTIFACTSArtifacts collections, little-endian:ART
- See Also:
-
TYPE_PROJECT_CONFIGURATION
public static final int TYPE_PROJECT_CONFIGURATIONPersisted Project Configuration:PPC
- See Also:
-
TYPE_PROJECT_METADATA
public static final int TYPE_PROJECT_METADATAPersisted Project Metadata:PPM
- See Also:
-
FLAG_NONE
public static final int FLAG_NONENo flag- See Also:
-
FLAG_COMPRESS
public static final int FLAG_COMPRESSThis flags is used to specify that the record should be compressed- See Also:
-
FLAG_ENCRYPT
public static final int FLAG_ENCRYPTThis flags is used to specify that the record should be encrypted- See Also:
-
FLAG_CRCCHECK
public static final int FLAG_CRCCHECKThe record should be accompanied by a CRC32 value to verify its basic integrity- See Also:
-
-
Constructor Details
-
JDB2Manager
-
-
Method Details
-
saveFile
DO NOT USE! PROJECT record only, old format!- Specified by:
saveFile
in interfaceIFileDatabase
- Parameters:
key
- file keydata
- file data- Returns:
- success indicator
-
loadFile
DO NOT USE! PROJECT record only, old format!- Specified by:
loadFile
in interfaceIFileDatabase
- Parameters:
key
- file key- Returns:
- file data, null on error
-
hasFile
Description copied from interface:IFileDatabase
Determine if the database contains the given file (the file must exist).- Specified by:
hasFile
in interfaceIFileDatabase
- Parameters:
key
- file key- Returns:
- presence indicator
-
getFileObject
Description copied from interface:IFileDatabase
Attempt to get the filesystem object backing this db file entry.This method may not be implemented (e.g. if this database is not backed by on-disk files), in which case the implementation may throw an
UnsupportedOperationException
.- Specified by:
getFileObject
in interfaceIFileDatabase
- Returns:
-
deleteFile
Description copied from interface:IFileDatabase
Delete a file.- Specified by:
deleteFile
in interfaceIFileDatabase
- Parameters:
key
- file key- Returns:
- success indicator
-
getFileReader
Description copied from interface:IFileDatabase
Get an input stream reader for low-level reading from a file. The client is responsible for closing the stream after usage.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException
.- Specified by:
getFileReader
in interfaceIFileDatabase
- Returns:
- Throws:
FileNotFoundException
-
getFileWriter
Description copied from interface:IFileDatabase
Get an output stream reader for low-level writing to a file. The client is responsible for closing the stream after usage.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException
.- Specified by:
getFileWriter
in interfaceIFileDatabase
- Returns:
- Throws:
FileNotFoundException
-
getDatabaseWriter
Description copied from interface:IFileDatabase
Get a database record writer.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException
.- Specified by:
getDatabaseWriter
in interfaceIFileDatabase
- Returns:
- Throws:
IOException
-
getDatabaseReader
Description copied from interface:IFileDatabase
Get a database record reader.This method may not be implemented, in which case the implementation may throw an
UnsupportedOperationException
.- Specified by:
getDatabaseReader
in interfaceIFileDatabase
- Returns:
- Throws:
IOException
-
projectTypeToName
-