+/*
+ * fac - Insert.java -
+ * Copyright © 2008 David Roden
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package net.pterodactylus.fac.core;
+
+/**
+ * Data container that keeps statistics of an insert.
+ *
+ * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
+ */
+public class Insert {
+
+ /** The time the data was inserted. */
+ private long insertTime;
+
+ /** The URI the data generated. */
+ private String uri;
+
+ /** The time the data should be retrieved. */
+ private long checkTime;
+
+ /** Whether the data was already checked. */
+ private boolean checked;
+
+ /** Whether the data was successfully downloaded. */
+ private boolean successful;
+
+ /**
+ * Returns the time the data was inserted.
+ *
+ * @return The time the data was inserted
+ */
+ public long getInsertTime() {
+ return insertTime;
+ }
+
+ /**
+ * Sets the time the data was inserted.
+ *
+ * @param insertTime
+ * The time the data was inserted
+ */
+ public void setInsertTime(long insertTime) {
+ this.insertTime = insertTime;
+ }
+
+ /**
+ * Returns the URI generated by the data.
+ *
+ * @return The URI of the data
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * Sets the URI generated by the data
+ *
+ * @param uri
+ * The URI of the data
+ */
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ /**
+ * Returns the time the data should be checked.
+ *
+ * @return The time the data should be checked
+ */
+ public long getCheckTime() {
+ return checkTime;
+ }
+
+ /**
+ * Sets the time the data should be checked.
+ *
+ * @param checkTime
+ * The time the data should be checked
+ */
+ public void setCheckTime(long checkTime) {
+ this.checkTime = checkTime;
+ }
+
+ /**
+ * Returns whether the data has already been checked, i.e. a check already
+ * returned a result.
+ *
+ * @return <code>true</code> if the data was already checked,
+ * <code>false</code> otherwise
+ */
+ public boolean isChecked() {
+ return checked;
+ }
+
+ /**
+ * Sets whether the data has already been checked, i.e. a check already
+ * returned a result.
+ *
+ * @param checked
+ * <code>true</code> if the data was already checked,
+ * <code>false</code> otherwise
+ */
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+
+ /**
+ * Returns whether the data was checked successfully.
+ *
+ * @return <code>true</code> if the data was checked successfully,
+ * <code>false</code> otherwise
+ */
+ public boolean isSuccessful() {
+ return successful;
+ }
+
+ /**
+ * Sets whether the data was checked successfully.
+ *
+ * @param successful
+ * <code>true</code> if the data was checked successfully,
+ * <code>false</code> otherwise
+ */
+ public void setSuccessful(boolean successful) {
+ this.successful = successful;
+ }
+
+}