- protected int insert() {
- if (id != 0) {
- throw new Error("refusing to insert");
- }
- synchronized (User.class) {
- GigiPreparedStatement ps = DatabaseConnection.getInstance().prepare("INSERT INTO certOwners() VALUES()");
- ps.execute();
- id = ps.lastInsertId();
- myCache.put(this);
- }
- return id;
- }
-
- public EmailAddress[] getEmails() {
- GigiPreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT id FROM emails WHERE memid=? AND deleted is NULL");
+ public Domain[] getDomains() {
+ GigiPreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT `id` FROM `domains` WHERE `memid`=? AND `deleted` IS NULL");