Race.java

src/net/sourceforge/pain/data/type/Race.java · 867 B

From the archive pain_0_41.zip

Download the archive   « Back to the archive contents

package net.sourceforge.pain.data.type;


import net.sourceforge.pain.data.*;
import net.sourceforge.pain.db.*;


/**
 Any object with this type is a Race.
 There will several predefined Races with different roles buckets,
 but all of them will have Race role
 */
public final class Race extends Role {

	public static final int NAME = 1 + LAST_BASE_FIELD_INDEX;
	public static final int NFIELDS = 2 + LAST_BASE_FIELD_INDEX;

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

	public Race() {
	}

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

		fillSuperSchema(types, names);

		types[NAME] = DbType.STRING;
		names[NAME] = "name";

		return new DbClassSchema(types, names);
	}

	public void setName(String name) {
		setString(NAME, name);
	}

	public String getName() {
		return getString(NAME);
	}
}

Site Stats

Snippets: 1791
Codebases: 571