Allow groups to be renamed if the user is an owner

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2008-12-30 08:36:36 -08:00
parent cf4fdbd57d
commit 60e9a606f3
11 changed files with 190 additions and 81 deletions

View File

@@ -100,6 +100,14 @@ public final class AccountGroup {
return name.get();
}
public AccountGroup.NameKey getNameKey() {
return name;
}
public void setNameKey(final AccountGroup.NameKey nameKey) {
name = nameKey;
}
public String getDescription() {
return description;
}

View File

@@ -20,10 +20,10 @@ import com.google.gwtorm.client.PrimaryKey;
import com.google.gwtorm.client.SecondaryKey;
public interface AccountGroupAccess extends
Access<AccountGroup, AccountGroup.NameKey> {
@PrimaryKey("name")
AccountGroup get(AccountGroup.NameKey name) throws OrmException;
@SecondaryKey("groupId")
Access<AccountGroup, AccountGroup.Id> {
@PrimaryKey("groupId")
AccountGroup get(AccountGroup.Id id) throws OrmException;
@SecondaryKey("name")
AccountGroup get(AccountGroup.NameKey name) throws OrmException;
}