blob: cc56b83ff6f65d7edc8737c4a48e1de1b7e180ff [file] [log] [blame]
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.models.jpa.performance;
import java.io.*;
import java.sql.Timestamp;
/**
* <b>Purpose</b>: Larger scale projects within the Employee Demo
* <p><b>Description</b>: LargeProject is a concrete subclass of Project. It is instantiated for Projects with type = 'L'. The additional
* information (budget, &amp; milestoneVersion) are mapped from the LPROJECT table.
* @see Project
*/
//@org.hibernate.annotations.Cache(usage=org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class LargeProject extends Project {
protected double budget;
protected Timestamp milestoneVersion;
public LargeProject() {
this.budget = 0.0;
}
public double getBudget() {
return budget;
}
public Timestamp getMilestoneVersion() {
return milestoneVersion;
}
public void setBudget(double budget) {
this.budget = budget;
}
public void setMilestoneVersion(Timestamp milestoneVersion) {
this.milestoneVersion = milestoneVersion;
}
/**
* Print the project's data.
*/
public String toString() {
StringWriter writer = new StringWriter();
writer.write("Large Project: ");
writer.write(getName());
writer.write(" ");
writer.write(getDescription());
writer.write(" " + getBudget());
writer.write(" ");
writer.write(String.valueOf(getMilestoneVersion()));
return writer.toString();
}
}