Package com.graphaware.common.transform
Class BaseTrivialIdTransformer<E extends Entity>
- java.lang.Object
-
- com.graphaware.common.transform.BaseIdTransformer<Long,E>
-
- com.graphaware.common.transform.BaseTrivialIdTransformer<E>
-
- All Implemented Interfaces:
IdTransformer<Long,E>
- Direct Known Subclasses:
TrivialNodeIdTransformer
,TrivialRelationshipIdTransformer
public abstract class BaseTrivialIdTransformer<E extends Entity> extends BaseIdTransformer<Long,E>
Abstract base-class for trivialIdTransformer
implementations that in fact perform no transformation.
-
-
Constructor Summary
Constructors Constructor Description BaseTrivialIdTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
fromEntity(E entity)
Transform an internal Neo4j node ID of aEntity
to a custom ID.protected long
toExistingGraphId(Long id)
Transform a custom ID to internal Neo4j ID.-
Methods inherited from class com.graphaware.common.transform.BaseIdTransformer
toGraphId
-
-
-
-
Method Detail
-
toExistingGraphId
protected long toExistingGraphId(Long id)
Description copied from class:BaseIdTransformer
Transform a custom ID to internal Neo4j ID.- Specified by:
toExistingGraphId
in classBaseIdTransformer<Long,E extends Entity>
- Parameters:
id
- to transform. Will never benull
.- Returns:
- internal Neo4j ID.
-
fromEntity
public final Long fromEntity(E entity)
Description copied from interface:IdTransformer
Transform an internal Neo4j node ID of aEntity
to a custom ID.- Parameters:
entity
- to take the ID to transform from. Must not benull
.- Returns:
- transformed custom ID. Never
null
.
-
-