01: //$Id: Value.java 5685 2005-02-12 07:19:50Z steveebersole $
02: package org.hibernate.mapping;
03:
04: import java.io.Serializable;
05: import java.util.Iterator;
06:
07: import org.hibernate.FetchMode;
08: import org.hibernate.MappingException;
09: import org.hibernate.engine.Mapping;
10: import org.hibernate.type.Type;
11:
12: /**
13: * A value is anything that is persisted by value, instead of
14: * by reference. It is essentially a Hibernate Type, together
15: * with zero or more columns. Values are wrapped by things with
16: * higher level semantics, for example properties, collections,
17: * classes.
18: *
19: * @author Gavin King
20: */
21: public interface Value extends Serializable {
22: public int getColumnSpan();
23:
24: public Iterator getColumnIterator();
25:
26: public Type getType() throws MappingException;
27:
28: public FetchMode getFetchMode();
29:
30: public Table getTable();
31:
32: public boolean hasFormula();
33:
34: public boolean isAlternateUniqueKey();
35:
36: public boolean isNullable();
37:
38: public boolean[] getColumnUpdateability();
39:
40: public boolean[] getColumnInsertability();
41:
42: public void createForeignKey() throws MappingException;
43:
44: public boolean isSimpleValue();
45:
46: public boolean isValid(Mapping mapping) throws MappingException;
47:
48: public void setTypeUsingReflection(String className,
49: String propertyName) throws MappingException;
50:
51: public Object accept(ValueVisitor visitor);
52: }
|