interface KeyParser<K> where K : Comparable<K>, K : Serializable
(source)
Interface for the KeyParser.
The KeyParser is an auxiliary interface managing all information related with the key. In particular, the KeyParser provides the following services: (I) key parsing, (II) key comparison translation for database queries, (III) key definition for database schema. In particular, to fulfill services (II) and (III), KeyParser must be aware of the underlying database technology.
keyColumnsDefinitionDB |
It is the list of all the column names and their definition that identify a key. abstract val keyColumnsDefinitionDB: List<Pair<String, String>> |
eqDB |
DB query for 'equal to' relationship. abstract fun eqDB(columnName: List<String>, k: K): String |
geqDB |
DB query for 'greater than or equal' relationship. abstract fun geqDB(columnName: List<String>, k: K): String |
getMax |
Returns the maximum value for the managed key type. abstract fun getMax(): K |
getMin |
Returns the minimum value for the managed key type.. abstract fun getMin(): K |
gtDB |
DB query for 'greater than' relationship. abstract fun gtDB(columnName: List<String>, k: K): String |
leqDB |
DB query for 'less than or equal' relationship. abstract fun leqDB(columnName: List<String>, k: K): String |
ltDB |
DB query for 'less than' relationship. abstract fun ltDB(columnName: List<String>, k: K): String |
parse |
Parses a key given the corresponding serialized representation. abstract fun parse(s: String): K |
toDB |
Returns the full representation of a key into the underlying database. abstract fun toDB(k: K): String |
toNodeTransfer |
Converts the ResultSet of a DB tuple into the corresponding NodeTransfer. abstract fun toNodeTransfer(rs: ResultSet): NodeTransfer |
IntParser |
Example of KeyParser class, managing simple key: Int. class IntParser : KeyParser<Int> |
KeyParserGroupBy |
Abstract class that extends the KeyParser interface. abstract class KeyParserGroupBy<K> : KeyParser<K> where K : Comparable<K>, K : Serializable |
PairIntDateParser |
Example of KeyParser class, managing key: PairIntDateKey. class PairIntDateParser : KeyParser<PairIntDateKey> |
PairIntIntParser |
Example of KeyParser class, managing a key: PairIntIntKey. class PairIntIntParser : KeyParser<PairIntIntKey> |
PersonParser |
Example of KeyParser class, managing a groupBy key: Person. A Person is identify by firstName and lastName class PersonParser : KeyParser<Person> |