1 package org.hibernate.tuple; 3 4 import org.hibernate.engine.CascadeStyle; 5 import org.hibernate.type.Type; 6 7 12 public class StandardProperty extends Property { 13 14 private boolean lazy; 15 private boolean insertable; 16 private boolean updateable; 17 private boolean nullable; 18 private boolean dirtyCheckable; 19 private boolean versionable; 20 private CascadeStyle cascadeStyle; 21 22 38 public StandardProperty( 39 String name, 40 String node, 41 Type type, 42 boolean lazy, 43 boolean insertable, 44 boolean updateable, 45 boolean nullable, 46 boolean checkable, 47 boolean versionable, 48 CascadeStyle cascadeStyle) { 49 super(name, node, type); 50 this.lazy = lazy; 51 this.insertable = insertable; 52 this.updateable = updateable; 53 this.nullable = nullable; 54 this.dirtyCheckable = checkable; 55 this.versionable = versionable; 56 this.cascadeStyle = cascadeStyle; 57 } 58 59 public boolean isLazy() { 60 return lazy; 61 } 62 63 public void setLazy(boolean lazy) { 64 this.lazy = lazy; 65 } 66 67 public boolean isInsertable() { 68 return insertable; 69 } 70 71 public void setInsertable(boolean insertable) { 72 this.insertable = insertable; 73 } 74 75 public boolean isUpdateable() { 76 return updateable; 77 } 78 79 public void setUpdateable(boolean updateable) { 80 this.updateable = updateable; 81 } 82 83 public boolean isNullable() { 84 return nullable; 85 } 86 87 public void setNullable(boolean nullable) { 88 this.nullable = nullable; 89 } 90 91 public boolean isDirtyCheckable(boolean hasUninitializedProperties) { 92 return isDirtyCheckable() && ( !hasUninitializedProperties || !isLazy() ); 93 } 94 95 public boolean isDirtyCheckable() { 96 return dirtyCheckable; 97 } 98 99 public void setDirtyCheckable(boolean checkable) { 100 this.dirtyCheckable = checkable; 101 } 102 103 public boolean isVersionable() { 104 return versionable; 105 } 106 107 public void setVersionable(boolean versionable) { 108 this.versionable = versionable; 109 } 110 111 public CascadeStyle getCascadeStyle() { 112 return cascadeStyle; 113 } 114 115 public void setCascadeStyle(CascadeStyle cascadeStyle) { 116 this.cascadeStyle = cascadeStyle; 117 } 118 } 119 | Popular Tags |