1. Using a PersistentEnum forum.hibernate.orgNewbie Joined: Thu Sep 04, 2003 10:05 am Posts: 3 Hello, I'm hoping that someone can give me an example of using Hibernate's PersistentEnum within a persistent class. I have the following class which implements the PersistentEnum interface: Code: package eg; import net.sf.hibernate.PersistentEnum; public class MembershipLevel implements PersistentEnum { private final int level; private MembershipLevel(int ... |
2. PersistentEnum and Immutable Classes in Architecture forum.hibernate.orgHello, Working on our project, which uses Hibernate for O/R mapping, I came across the following idea : Context : Almost any real-life application has objects that represents enumerations, things like statusses, currencies, languages, etc.. ( == *low* number of objects that never change on-line) Currently hibernate can support this in one of two ways : PersistentEnums, or as a fully ... |
3. typesafe enum not implementing PersistentEnum forum.hibernate.orgThe great thing about hibernate is that persistent classes do not need to implement special interfaces for persistence...except for Persistent Enum Type (see hibernate doc 4.2.3). Imagine I have an "Address" object. One of the fields is "Continent". Continent is a typesafe enumeration ={africa, europe,...} An address can be serialized and sent from the server to a swing client. So the ... |
4. HQL and PersistentEnum problem forum.hibernate.org |
5. Set with elements of type PersistentEnum forum.hibernate.orgI want to do a mapping like: |
6. PersistentEnum replacement forum.hibernate.org |
7. PersistentEnum scheduled for deprecation in 2.2 ? forum.hibernate.orgI'm about to move all my enums to a custom UserType. I just wanted to check in and make sure this is going to be the recommended approach with future versions of hibernate 2.2+ -- particularly with the addition of Enums in Java 1.5? If a new mechanism is being contemplated to interact with enums in Java 1.5, we will probably ... |
8. PersistentEnum deprecated, advices?? forum.hibernate.org |
9. PersistentEnum migration forum.hibernate.orgThank you for your reply. I hear what your saying... but that's very undesirable, because the parameters isn't dynamic: It's always the same for that query, and therefore dosn't need to be bound at runtime. The other option is to move the 'value' of the enum into the query itself, but this is also undesirable because it breaks the pure object ... |
10. Collection of PersistentEnum? forum.hibernate.orgI'm having a problem trying to map a persistent enumeration into a collection using Hibernate 2.1.7, and I haven't been able to find any examples that would help me out. Thought I'd ask about it here. I have a class that represents a User and I need to associate with that user a collection of Privileges. The Privileges are currently defined ... |