001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.kuali.module.vendor.bo;
018:
019: import java.util.LinkedHashMap;
020:
021: import org.kuali.core.bo.Inactivateable;
022: import org.kuali.core.bo.PersistableBusinessObjectBase;
023:
024: /**
025: * Alternate name for a Vendor.
026: */
027: public class VendorAlias extends PersistableBusinessObjectBase
028: implements Inactivateable {
029:
030: private String vendorAliasName;
031: private Integer vendorDetailAssignedIdentifier;
032: private Integer vendorHeaderGeneratedIdentifier;
033: private boolean active;
034:
035: VendorDetail vendorDetail;
036:
037: /**
038: * Default constructor.
039: */
040: public VendorAlias() {
041:
042: }
043:
044: public String getVendorAliasName() {
045:
046: return vendorAliasName;
047: }
048:
049: public void setVendorAliasName(String vendorAliasName) {
050: this .vendorAliasName = vendorAliasName;
051: }
052:
053: public Integer getVendorDetailAssignedIdentifier() {
054:
055: return vendorDetailAssignedIdentifier;
056: }
057:
058: public void setVendorDetailAssignedIdentifier(
059: Integer vendorDetailAssignedIdentifier) {
060: this .vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
061: }
062:
063: public Integer getVendorHeaderGeneratedIdentifier() {
064:
065: return vendorHeaderGeneratedIdentifier;
066: }
067:
068: public void setVendorHeaderGeneratedIdentifier(
069: Integer vendorHeaderGeneratedIdentifier) {
070: this .vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
071: }
072:
073: public boolean isActive() {
074:
075: return active;
076: }
077:
078: public void setActive(boolean active) {
079: this .active = active;
080: }
081:
082: public VendorDetail getVendorDetail() {
083:
084: return vendorDetail;
085: }
086:
087: /**
088: * Sets the vendorDetail attribute value.
089: *
090: * @param vendorDetail The vendorDetail to set.
091: * @deprecated
092: */
093: public void setVendorDetail(VendorDetail vendorDetail) {
094: this .vendorDetail = vendorDetail;
095: }
096:
097: /**
098: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
099: */
100: protected LinkedHashMap toStringMapper() {
101: LinkedHashMap m = new LinkedHashMap();
102: m.put("vendorAliasName", this .vendorAliasName);
103: if (this .vendorDetailAssignedIdentifier != null) {
104: m.put("vendorDetailAssignedIdentifier",
105: this .vendorDetailAssignedIdentifier.toString());
106: }
107: if (this .vendorHeaderGeneratedIdentifier != null) {
108: m.put("vendorHeaderGeneratedIdentifier",
109: this .vendorHeaderGeneratedIdentifier.toString());
110: }
111:
112: return m;
113: }
114:
115: /**
116: * This method has to be overriden so that we will print only the vendorAliasName in the vendor lookup result.
117: *
118: * @see org.kuali.core.bo.BusinessObjectBase#toStringBuilder(java.util.LinkedHashMap)
119: */
120: @Override
121: public String toStringBuilder(LinkedHashMap mapper) {
122:
123: return vendorAliasName;
124: }
125: }
|