001: /*
002: * Copyright 2004-2006 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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.compass.sample.petclinic;
018:
019: import java.util.Date;
020:
021: /**
022: * Simple JavaBean domain object representing a visit.
023: *
024: * @author Ken Krebs
025: */
026: public class Visit extends Entity {
027:
028: /** Holds value of property date. */
029: private Date date;
030:
031: /** Holds value of property description. */
032: private String description;
033:
034: /** Holds value of property pet. */
035: private Pet pet;
036:
037: /** Creates a new instance of Visit for the current date */
038: public Visit() {
039: this .date = new Date();
040: }
041:
042: /**
043: * Getter for property date.
044: *
045: * @return Value of property date.
046: */
047: public Date getDate() {
048: return this .date;
049: }
050:
051: /**
052: * Setter for property date.
053: *
054: * @param date
055: * New value of property date.
056: *
057: */
058:
059: public void setDate(Date date) {
060: this .date = date;
061: }
062:
063: /**
064: * Getter for property description.
065: *
066: * @return Value of property description.
067: */
068: public String getDescription() {
069: return this .description;
070: }
071:
072: /**
073: * Setter for property description.
074: *
075: * @param description
076: * New value of property description.
077: */
078: public void setDescription(String description) {
079: this .description = description;
080: }
081:
082: /**
083: * Getter for property pet.
084: *
085: * @return Value of property pet.
086: *
087: */
088: public Pet getPet() {
089: return this .pet;
090: }
091:
092: /**
093: * Setter for property pet.
094: *
095: * @param pet
096: * New value of property pet.
097: */
098: protected void setPet(Pet pet) {
099: this.pet = pet;
100: }
101: }
|