public final class KKey extends Object implements Serializable, Comparable<KKey>
Represents single key in AQDEF format (e.g. K1001) and can be used to create AQDEF data structure (K-key : value pairs).
You can obtain KKey instance by calling of(String).
K-key instances are thread safe, immutable and cached. If you call of(String) for the same K-key multiple times,
you will probably get the same instances of KKey (this behavior is not guaranteed).
K-key also provides some metadata like datatype of the K-key. These can be retrieved like this:
KKey kKey = KKey.of("K1001");
KKeyMetadata metadata = kKey.getMetadata();
Or you can directly read metadata properties using delegate methods getDataType(), getConverter() etc.
| Modifier and Type | Class and Description |
|---|---|
static class |
KKey.Level |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(KKey o) |
boolean |
equals(Object obj) |
IKKeyValueConverter<?> |
getConverter()
|
Class<?> |
getDataType()
|
String |
getDbColumnName()
|
String |
getKey() |
KKey.Level |
getLevel()
Returns
KKey.Level of the AQDEF structure this K-key belongs to. |
KKeyMetadata |
getMetadata()
Gets
metadata of this K-key |
int |
hashCode() |
boolean |
isCharacteristicLevel() |
boolean |
isCustom() |
boolean |
isCustomCharacteristicLevel() |
boolean |
isCustomPartLevel() |
boolean |
isCustomValueLevel() |
boolean |
isGroupLevel() |
boolean |
isHierarchyLevel() |
boolean |
isPartLevel() |
boolean |
isRespectsCharacteristicDecimalSettings()
|
boolean |
isSimpleHierarchyLevel() |
boolean |
isValueLevel() |
static KKey |
of(String key)
Gets the instance of
KKey for the given key. |
boolean |
shouldBeWrittenToDfq() |
String |
toString() |
public static KKey of(String key)
KKey for the given key.
Returned instance may not be a new instance, but reused instance from cache.key - public String getKey()
public IKKeyValueConverter<?> getConverter()
public String getDbColumnName()
public Class<?> getDataType()
public boolean isRespectsCharacteristicDecimalSettings()
public KKeyMetadata getMetadata()
metadata of this K-keypublic KKey.Level getLevel()
KKey.Level of the AQDEF structure this K-key belongs to.public boolean isPartLevel()
public boolean isCustomPartLevel()
public boolean isCharacteristicLevel()
public boolean isCustomCharacteristicLevel()
public boolean isValueLevel()
public boolean isCustomValueLevel()
public boolean isGroupLevel()
public boolean isHierarchyLevel()
public boolean isSimpleHierarchyLevel()
public boolean isCustom()
public boolean shouldBeWrittenToDfq()
public int compareTo(KKey o)
compareTo in interface Comparable<KKey>Copyright © 2019. All rights reserved.