1 29 30 package com.caucho.amber.cfg; 31 32 import java.util.HashMap ; 33 34 35 38 public class OneToOneConfig extends AbstractRelationConfig { 39 40 private boolean _isOptional; 42 private String _mappedBy; 43 44 private HashMap <String , PrimaryKeyJoinColumnConfig> _primaryKeyJoinColumnMap 46 = new HashMap <String , PrimaryKeyJoinColumnConfig>(); 47 48 private HashMap <String , JoinColumnConfig> _joinColumnMap 49 = new HashMap <String , JoinColumnConfig>(); 50 51 public boolean getOptional() 52 { 53 return _isOptional; 54 } 55 56 public void setOptional(boolean isOptional) 57 { 58 _isOptional = isOptional; 59 } 60 61 public String getMappedBy() 62 { 63 return _mappedBy; 64 } 65 66 public void setMappedBy(String mappedBy) 67 { 68 _mappedBy = mappedBy; 69 } 70 71 public PrimaryKeyJoinColumnConfig getPrimaryKeyJoinColumn(String columnName) 72 { 73 return _primaryKeyJoinColumnMap.get(columnName); 74 } 75 76 public void addPrimaryKeyJoinColumn(PrimaryKeyJoinColumnConfig primaryKeyJoinColumn) 77 { 78 _primaryKeyJoinColumnMap.put(primaryKeyJoinColumn.getName(), 79 primaryKeyJoinColumn); 80 } 81 82 public HashMap <String , PrimaryKeyJoinColumnConfig> getPrimaryKeyJoinColumnMap() 83 { 84 return _primaryKeyJoinColumnMap; 85 } 86 87 public JoinColumnConfig getJoinColumn(String name) 88 { 89 return _joinColumnMap.get(name); 90 } 91 92 public void addJoinColumn(JoinColumnConfig joinColumn) 93 { 94 _joinColumnMap.put(joinColumn.getName(), 95 joinColumn); 96 } 97 98 public HashMap <String , JoinColumnConfig> getJoinColumnMap() 99 { 100 return _joinColumnMap; 101 } 102 } 103 | Popular Tags |