I'm working on an Android App that has it's own way to generate unique identifiers for entities.
Before every entity creation we assign a new ID for our objects. We're currently doing something like that:
IDGenerator.assignCodeFor(entity);
dao.create(entity);
I know that OrmLite has some sort of generateId id scheme, but seems like the feature were designed for working with database sequences(eg: PostgreSQL SERIAL datatype and mysql's AUTO_INCREMENT).
I already looked into customized DataPersister, but i came up with some sort of workarround that i don't feel confortable with.
TLDR;
So my question is: How can i programmatically generate custom ID for my entities with OrmLite?
I'm looking for something like a interceptor or a strategy pattern.