clean code

This commit is contained in:
Peter Hormanns 2012-07-27 12:02:41 +00:00
parent d596fcbf58
commit ba1d525cbe
3 changed files with 7 additions and 8 deletions

View File

@ -36,6 +36,8 @@ alter table domain drop column domain_until;
alter table domain drop column domain_filed; alter table domain drop column domain_filed;
alter table domain drop column domain_reminder; alter table domain drop column domain_reminder;
alter table domain drop column domain_template; alter table domain drop column domain_template;
alter table domain drop column domain_status;
alter table domain drop column domain_status_changed;

View File

@ -258,17 +258,10 @@ CREATE SEQUENCE domain_domain_id_seq
CREATE TABLE domain ( CREATE TABLE domain (
domain_name character varying(256) NOT NULL, domain_name character varying(256) NOT NULL,
domain_status character varying(12) NOT NULL,
domain_status_changed date NOT NULL,
domain_filed date,
domain_since date, domain_since date,
domain_until date,
domain_dns_master character varying(64), domain_dns_master character varying(64),
domain_id integer DEFAULT nextval('domain_domain_id_seq'::regclass) NOT NULL, domain_id integer DEFAULT nextval('domain_domain_id_seq'::regclass) NOT NULL,
domain_owner integer NOT NULL, domain_owner integer NOT NULL
domain_reminder date,
domain_free boolean DEFAULT false NOT NULL,
domain_template character varying(32)
); );

View File

@ -101,6 +101,10 @@ public class GenericModuleImpl implements ModuleInterface {
private String getterName(Field f) { private String getterName(Field f) {
String name = f.getName(); String name = f.getName();
char firstChar = Character.toUpperCase(name.charAt(0)); char firstChar = Character.toUpperCase(name.charAt(0));
Class<?> type = f.getType();
if (type.getCanonicalName().startsWith("boolean")) {
return "is" + firstChar + name.substring(1);
}
return "get" + firstChar + name.substring(1); return "get" + firstChar + name.substring(1);
} }