⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 root.java

📁 这个是perst-269.zip下面的SOURCECODE,和大家分享了。
💻 JAVA
字号:
import org.garret.perst.*;

public class Root extends Persistent { 
    Index teamId;
    Index teamName;
    Index playerLName;

    public void readObject(IInputStream in) { 
        teamId = (Index)in.readObject();
        teamName = (Index)in.readObject();
        playerLName = (Index)in.readObject();
    }

    public void writeObject(IOutputStream out) { 
        out.writeObject(teamId);
        out.writeObject(teamName);
        out.writeObject(playerLName);
    }

    public Root() {}

    public Root(Storage db) { 
        super(db);
        teamId = db.createIndex(Types.Int, true);
        teamName = db.createIndex(Types.String, true);
        playerLName = db.createIndex(Types.String, false);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -