X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet%2Fpterodactylus%2Ffac%2Fcore%2FInsert.java;fp=src%2Fnet%2Fpterodactylus%2Ffac%2Fcore%2FInsert.java;h=24827173536375cbbe8e179fc7b0c9adea5538d1;hb=684a2a6bfcc716cc06f08d3fa180ae404dc7ce87;hp=0000000000000000000000000000000000000000;hpb=3d42b15831f6427e1635323def553f7238291921;p=fac.git diff --git a/src/net/pterodactylus/fac/core/Insert.java b/src/net/pterodactylus/fac/core/Insert.java new file mode 100644 index 0000000..2482717 --- /dev/null +++ b/src/net/pterodactylus/fac/core/Insert.java @@ -0,0 +1,145 @@ +/* + * 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 true if the data was already checked, + * false otherwise + */ + public boolean isChecked() { + return checked; + } + + /** + * Sets whether the data has already been checked, i.e. a check already + * returned a result. + * + * @param checked + * true if the data was already checked, + * false otherwise + */ + public void setChecked(boolean checked) { + this.checked = checked; + } + + /** + * Returns whether the data was checked successfully. + * + * @return true if the data was checked successfully, + * false otherwise + */ + public boolean isSuccessful() { + return successful; + } + + /** + * Sets whether the data was checked successfully. + * + * @param successful + * true if the data was checked successfully, + * false otherwise + */ + public void setSuccessful(boolean successful) { + this.successful = successful; + } + +}