Package org.kie.workbench.common.screens.datamodeller.model

Examples of org.kie.workbench.common.screens.datamodeller.model.DataObjectTO


    private void initAnnotationDefinitions() {
      annotationDefinitions = modelerService.getAnnotationDefinitions();
    }
   
    private DataObjectTO createDataObject(String packageName, String name, String superClass) {
        DataObjectTO dataObject = new DataObjectTO(name, packageName, superClass);
        return dataObject;
    }
View Full Code Here


            final FactModels factModels = FactModelPersistence.unmarshal( declaredType );
            final String packageName = factModels.getPackageName();
            final DataModelTO dataModelTO = new DataModelTO();

            for ( FactMetaModel factMetaModel : factModels.getModels() ) {
                final DataObjectTO dataObjectTO = new DataObjectTO( factMetaModel.getName(),
                                                                    packageName,
                                                                    factMetaModel.getSuperType() );
                final List<AnnotationMetaModel> annotationMetaModel = factMetaModel.getAnnotations();
                addAnnotations( dataObjectTO,
                                annotationMetaModel );

                final List<FieldMetaModel> fields = factMetaModel.getFields();

                for ( FieldMetaModel fieldMetaModel : fields ) {
                    final String fieldName = fieldMetaModel.name;
                    final String fieldType = fieldMetaModel.type;
                    //Guvnor 5.5 (and earlier) does not have MultipleType
                    boolean isMultiple = false;
                    boolean isBaseType = orderedBaseTypes.containsValue( fieldType );
                    ObjectPropertyTO property = new ObjectPropertyTO( fieldName,
                                                                      fieldType,
                                                                      isMultiple,
                                                                      isBaseType );
                    //field has no annotation in Guvnor 5.5 (and earlier)
                    dataObjectTO.getProperties().add( property );

                    result.addMessage( "Created Java Type " + getJavaTypeFQCN( dataObjectTO ),
                                       ConversionMessageType.INFO );
                }
View Full Code Here

TOP

Related Classes of org.kie.workbench.common.screens.datamodeller.model.DataObjectTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.