WorldTime.java

src/net/sourceforge/pain/data/WorldTime.java · 656 B

From the archive pain_0_41.zip

Download the archive   « Back to the archive contents

package net.sourceforge.pain.data;

import net.sourceforge.pain.db.*;

/** simple counter */
public final class WorldTime extends DbObject {

	protected static final int TIME = 0;
	protected static final int NFIELDS = 1;

	public WorldTime() {
	}

	public WorldTime(PainDB db) {
		super(db);
	}

	public DbClassSchema provideSchema() {
		byte types[] = new byte[NFIELDS];
		String names[] = new String[NFIELDS];

		types[TIME] = DbType.INT;
		names[TIME] = "time";
		return new DbClassSchema(types, names);
	}

	public int getTime() {
		return getInt(TIME);
	}

	public void setTime(int time) {
		setInt(TIME, time);
	}
}

Site Stats

Snippets: 1791
Codebases: 571