01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: PersonMetaData.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rifetestmodels;
09:
10: import com.uwyn.rife.site.ConstrainedProperty;
11: import com.uwyn.rife.site.MetaData;
12:
13: public class PersonMetaData extends MetaData {
14: public void activateMetaData() {
15: addConstraint(new ConstrainedProperty("firstname")
16: .maxLength(10).notNull(true));
17: addConstraint(new ConstrainedProperty("lastname").inList(
18: "Smith", "Jones", "Ronda"));
19: }
20: }
|