Java tutorial
/* Copyright (C) 2013-2014 Computer Sciences Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ezbake.data.elastic.test.models; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import org.apache.commons.lang.time.DateUtils; public final class PlaceOfInterest { private String title; private String comments; private String[] tags; private Location location; private Date visit; private int rating; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getComments() { return comments; } public void setComments(String comments) { this.comments = comments; } public String[] getTags() { return tags; } public void setTags(String[] tags) { this.tags = Arrays.copyOf(tags, tags.length); } public Location getLocation() { return location; } public void setLocation(Location location) { this.location = location; } public Date getVisit() { return (Date) visit.clone(); } public void setVisit(Date visit) { this.visit = DateUtils.truncate(visit, Calendar.SECOND); } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } }