Im new in cache, i came from Java and im missing some features that i couldn't find in the documentation, I hope you can help me with this questions.
Just a brief introducction:
- Im in a project with old cache version, so saddly i can't use Eclipse + Atelier, so im using Studio.
- Currently im in a project with persistent classes, we want to turn apart the globals and focus on tables.
Is there any way to make something like hibernate for cache %Persistent classes? For example, if i want to get all the records for a table in Java+Hibernate+Criteria i'll do something like this:
myListOfObjects = myPersistentClass.list(); // Equivalent to SELECT *
In cache i have to
I tried to create some class that inheritance from %Persistent and contains all the methods i want to be used for the rest of persistent objects. With this i only have the data access methods in one place (something similar to the sample Employee who extends from Person, but that creates some weird table called Person that only will contains the ID's and it will have the ID duplicated by every class that extends from it).
Another example, i have some dictonary tables that all of them contains a column called "CODE" i want all of the persistent classes that references a dictionary table own a method to get all the records " WHERE CODE = Xparameter" and this method only returns one result.
myObject = myPersistentClass.getByCode(Xparameter); // Equivalent to SELECT * FROM X WHERE CODE = "Xparameter"
In this example i asked for the most easy questions that came to my mind, i don't only want to achive a "SELECT *" and a "WHERE CODE = ", this question goes far from that. Im looking for a better way to get information from %Persistent classes with good practices.
Is there any accepted way to achive this?
I hope i explained myself correctly.