Index: topia/src/java/org/codelutin/topia/annotation/ClassInfo.java diff -u /dev/null topia/src/java/org/codelutin/topia/annotation/ClassInfo.java:1.1 --- /dev/null Tue Jul 19 13:15:18 2005 +++ topia/src/java/org/codelutin/topia/annotation/ClassInfo.java Tue Jul 19 13:15:13 2005 @@ -0,0 +1,79 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * ClassInfo.java + * + * Created: 19 juillet 2005 12:18:58 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/07/19 13:15:13 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.annotation; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface ClassInfo { // ClassInfo + /** le type de classe */ + ClassType type() default ClassType.ENTITY; + /** indique que la classe est une classe d'association */ + boolean associationClass() default false; + /** indique que la classe est une classe qui n'apparaissait pas dans le + diagramme initial, mais qui a ete genere pour les besoins du framework */ + boolean generatedClass() default false; + + /** liste des champs de la classe, les associations A et B ne font pas + parti des champs*/ + String [] fields(); + /** liste les types de champs de la classe */ + Class [] fieldTypes(); + /** Les valeurs par defaut des champs de la classe */ + String [] fieldValues(); + + /** Si associationClass est vrai indique la partie A de l'association */ + Class associationA() default null; + /** Le nom du champs supportant l'association pour la classe A */ + String associationAField() default ""; + /** indique la cardinalité de l'association, -1 indique *, 0 indique une + non navigabilité */ + int associationACardinality() default 0; + /** indique si le type d'association pour la partie A */ + boolean associationAIsComposition() default false; + + /** Si associationClass est vrai indique la partie B de l'association */ + Class associationB() default null; + /** Le nom du champs supportant l'association pour la classe B */ + String associationBField() default ""; + /** indique la cardinalité de l'association, -1 indique *, 0 indique une + non navigabilité */ + int associationBCardinality() default 0; + /** indique si le type d'association pour la partie B */ + boolean associationBIsComposition() default false; + +} // ClassInfo + Index: topia/src/java/org/codelutin/topia/annotation/ClassType.java diff -u /dev/null topia/src/java/org/codelutin/topia/annotation/ClassType.java:1.1 --- /dev/null Tue Jul 19 13:15:18 2005 +++ topia/src/java/org/codelutin/topia/annotation/ClassType.java Tue Jul 19 13:15:13 2005 @@ -0,0 +1,50 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * ClassType.java + * + * Created: 19 juillet 2005 12:30:47 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/07/19 13:15:13 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.annotation; + +public enum ClassType { // ClassType + + /** Classe d'ecrivant une entite persistante */ + ENTITY, + /** Classe contenant les operations d'une entite */ + OPERATION, + /** Classe decrite comme un service dans le diagramme */ + SERVICE, + /** Classe de service associe a une entite */ + PERSISTENCE_SERVICE, + /** classe d'aide pour le framework */ + HELPER, + /** autre type de classe */ + OTHER + +} // ClassType + Index: topia/src/java/org/codelutin/topia/annotation/MethodInfo.java diff -u /dev/null topia/src/java/org/codelutin/topia/annotation/MethodInfo.java:1.1 --- /dev/null Tue Jul 19 13:15:18 2005 +++ topia/src/java/org/codelutin/topia/annotation/MethodInfo.java Tue Jul 19 13:15:13 2005 @@ -0,0 +1,62 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * MethodInfo.java + * + * Created: 19 juillet 2005 12:36:01 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/07/19 13:15:13 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.annotation; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface MethodInfo { // MethodInfo + /** le type de methode */ + MethodType type() default MethodType.Operation; + /** si type vaut FIELD_ACCESSOR alors indique si la methode est une methode + de modification de la valeur du champs sur lequel travail la méthode */ + boolean isFieldModifier() default false; + /** si type vaut FIELD_ACCESSOR alors indique le type du champs sur lequel + travail la méthode */ + String field() default ""; + /** si type vaut FIELD_ACCESSOR alors indique le type du champs sur lequel + travail la méthode */ + Class fieldType() default null; + /** si type vaut FIELD_ACCESSOR alors indique la valeur par defaut du + champs sur lequel travail la méthode */ + String fieldValue() default null; + /** si type vaut FIELD_ACCESSOR et que le fieldType est une relation, + indique la clase responsable de la conservation de l'information de la + relation */ + Class associationClass() default null; + +} // MethodInfo + Index: topia/src/java/org/codelutin/topia/annotation/MethodType.java diff -u /dev/null topia/src/java/org/codelutin/topia/annotation/MethodType.java:1.1 --- /dev/null Tue Jul 19 13:15:18 2005 +++ topia/src/java/org/codelutin/topia/annotation/MethodType.java Tue Jul 19 13:15:13 2005 @@ -0,0 +1,44 @@ +/* *##% + * Copyright (C) 2005 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * MethodType.java + * + * Created: 19 juillet 2005 12:41:50 CEST + * + * @author Benjamin POUSSIN + * @version $Revision: 1.1 $ + * + * Last update: $Date: 2005/07/19 13:15:13 $ + * by : $Author: bpoussin $ + */ + +package org.codelutin.topia.annotation; + +public enum MethodType { // MethodType + + /** methode permettant l'acces a un champs */ + FIELD_ACCESSOR, + /** methode qui provient du diagramme initial */ + OPERATION, + /** methode genere pour les besoins du framework */ + GENERATED + +} // MethodType +