1 package org.hibernate.metadata; 3 4 import java.io.Serializable ; 5 import java.util.Map ; 6 7 import org.hibernate.HibernateException; 8 import org.hibernate.EntityMode; 9 import org.hibernate.engine.SessionImplementor; 10 import org.hibernate.type.Type; 11 12 18 public interface ClassMetadata { 19 20 24 27 public String getEntityName(); 28 29 32 public String getIdentifierPropertyName(); 33 34 37 public String [] getPropertyNames(); 38 39 42 public Type getIdentifierType(); 43 44 47 public Type[] getPropertyTypes(); 48 49 52 public Type getPropertyType(String propertyName) throws HibernateException; 53 54 57 public boolean hasProxy(); 58 59 62 public boolean isMutable(); 63 64 67 public boolean isVersioned(); 68 69 72 public int getVersionProperty(); 73 74 77 public boolean[] getPropertyNullability(); 78 79 80 83 public boolean[] getPropertyLaziness(); 84 85 88 public boolean hasIdentifierProperty(); 89 90 93 public boolean hasNaturalIdentifier(); 94 95 98 public int[] getNaturalIdentifierProperties(); 99 100 103 public boolean hasSubclasses(); 104 105 108 public boolean isInherited(); 109 110 114 117 public Object [] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session) 118 throws HibernateException; 119 120 121 125 128 public Class getMappedClass(EntityMode entityMode); 129 130 133 public Object instantiate(Serializable id, EntityMode entityMode) throws HibernateException; 134 135 138 public Object getPropertyValue(Object object, String propertyName, EntityMode entityMode) throws HibernateException; 139 140 148 public Object [] getPropertyValues(Object entity, EntityMode entityMode) throws HibernateException; 149 150 153 public void setPropertyValue(Object object, String propertyName, Object value, EntityMode entityMode) throws HibernateException; 154 155 158 public void setPropertyValues(Object object, Object [] values, EntityMode entityMode) throws HibernateException; 159 160 163 public Serializable getIdentifier(Object entity, EntityMode entityMode) throws HibernateException; 164 165 168 public void setIdentifier(Object object, Serializable id, EntityMode entityMode) throws HibernateException; 169 170 173 public boolean implementsLifecycle(EntityMode entityMode); 174 175 178 public boolean implementsValidatable(EntityMode entityMode); 179 180 184 public Object getVersion(Object object, EntityMode entityMode) throws HibernateException; 185 186 } 187 | Popular Tags |