01: //$Id: CollectionMetadata.java 3890 2004-06-03 16:31:32Z steveebersole $
02: package org.hibernate.metadata;
03:
04: import org.hibernate.type.Type;
05:
06: /**
07: * Exposes collection metadata to the application
08: *
09: * @author Gavin King
10: */
11: public interface CollectionMetadata {
12: /**
13: * The collection key type
14: */
15: public Type getKeyType();
16:
17: /**
18: * The collection element type
19: */
20: public Type getElementType();
21:
22: /**
23: * The collection index type (or null if the collection has no index)
24: */
25: public Type getIndexType();
26:
27: /**
28: * Is this collection indexed?
29: */
30: public boolean hasIndex();
31:
32: /**
33: * The name of this collection role
34: */
35: public String getRole();
36:
37: /**
38: * Is the collection an array?
39: */
40: public boolean isArray();
41:
42: /**
43: * Is the collection a primitive array?
44: */
45: public boolean isPrimitiveArray();
46:
47: /**
48: * Is the collection lazily initialized?
49: */
50: public boolean isLazy();
51: }
|