当前位置: 首页>>代码示例>>Java>>正文


Java MappedSuperclass类代码示例

本文整理汇总了Java中org.netbeans.jpa.modeler.spec.MappedSuperclass的典型用法代码示例。如果您正苦于以下问题:Java MappedSuperclass类的具体用法?Java MappedSuperclass怎么用?Java MappedSuperclass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MappedSuperclass类属于org.netbeans.jpa.modeler.spec包,在下文中一共展示了MappedSuperclass类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateSuperClasses

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
private void generateSuperClasses()
        throws InvalidDataException, IOException {

    List<MappedSuperclass> parsedMappedSuperclasses
            = parsedEntityMappings.getMappedSuperclass();

    for (MappedSuperclass parsedMappedSuperclass : parsedMappedSuperclasses) {
        task.log("Generating MappedSuperclass Class : " + parsedMappedSuperclass.getClazz(), true);
        ClassDefSnippet classDef = new SuperClassGenerator(
                parsedMappedSuperclass, packageName).getClassDef();

        classesRepository.addWritableSnippet(
                ClassType.SUPER_CLASS, classDef);

        writeSnippet(classDef);
    }
}
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:18,代码来源:ORM2Java.java

示例2: processSuperClass

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
private static void processSuperClass(WorkSpace workSpace, JavaClass _class, EntityAccessor accessor) {
    if (_class.getSuperclass() != null) {
        if (_class.getSuperclass() instanceof MappedSuperclass) {
            MappedSuperclass superclass = (MappedSuperclass) _class.getSuperclass();
            superclass.getAttributes().updateAccessor(workSpace, accessor.getAttributes(), true);
            processSuperClass(workSpace, superclass, accessor);
        } else {
            accessor.setParentClassName(_class.getSuperclass().getClazz());
        }
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:12,代码来源:EntitySpecAccessor.java

示例3: getInstance

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
public static MappedSuperclassSpecAccessor getInstance(WorkSpace workSpace, MappedSuperclass mappedSuperclass) {
    MappedSuperclassSpecAccessor accessor = new MappedSuperclassSpecAccessor(mappedSuperclass);
    accessor.setClassName(mappedSuperclass.getClazz());
    accessor.setAccess("VIRTUAL");
    accessor.setAttributes(mappedSuperclass.getAttributes().getAccessor(workSpace, true));
    if (mappedSuperclass.getSuperclass() != null) {
        accessor.setParentClassName(mappedSuperclass.getSuperclass().getClazz());
    }
    return accessor;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:MappedSuperclassSpecAccessor.java

示例4: generateMappedSuperClasses

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
private void generateMappedSuperClasses() throws InvalidDataException, IOException {
    List<MappedSuperclass> parsedMappedSuperclasses = entityMappings.getMappedSuperclass().stream().filter(e -> e.getGenerateSourceCode()).collect(toList());
    if(!parsedMappedSuperclasses.isEmpty()){
    task.log(Console.wrap("Generating MappedSuperclass Class : " , FG_RED, BOLD), true);
    }
    for (MappedSuperclass parsedMappedSuperclass : parsedMappedSuperclasses) {
        task.log(parsedMappedSuperclass.getClazz(), true);
        ManagedClassDefSnippet classDef = new MappedSuperClassGenerator(parsedMappedSuperclass, packageName).getClassDef();
        classDef.setJaxbSupport(entityMappings.getJaxbSupport());

        classesRepository.addWritableSnippet(ClassType.SUPER_CLASS, classDef);
        parsedMappedSuperclass.setFileObject(ORMConverterUtil.writeSnippet(classDef, destDir));
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:15,代码来源:ManagedClassModuleGeneratorImpl.java

示例5: makeSiblingOrphan

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
@Deprecated
private static void makeSiblingOrphan(MappedSuperclass mappedSuperclass) {
    IPrimaryKeyAttributes attr = mappedSuperclass.getAttributes();
    attr.setManyToMany(null);
    attr.setManyToOne(null);
    attr.setOneToMany(null);
    attr.setOneToOne(null);
    attr.setEmbedded(null);
    attr.setElementCollection(null);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:11,代码来源:DBUtil.java

示例6: init

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
@Override
public void init() {
    super.init();
    MappedSuperclass mappedSuperclass = this.getBaseElementSpec();
    if (mappedSuperclass.getAttributes() == null) {
        mappedSuperclass.setAttributes(new PrimaryKeyAttributes());
    }
    if (mappedSuperclass.getClazz() == null || mappedSuperclass.getClazz().isEmpty()) {
        mappedSuperclass.setClazz(this.getModelerScene().getNextClassName("MappedSuperclass_"));
    }
    setName(mappedSuperclass.getClazz());
    setLabel(mappedSuperclass.getClazz());
    validateName(null, this.getName());

}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:16,代码来源:MappedSuperclassWidget.java

示例7: SuperClassGenerator

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
public SuperClassGenerator(
        MappedSuperclass parsedMappedSuperclass,
        String packageName) {

    this.mappedSuperclass = parsedMappedSuperclass;
    this.packageName = packageName;
}
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:8,代码来源:SuperClassGenerator.java

示例8: init

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
@Override
    public void init() {
        MappedSuperclass mappedSuperclass = (MappedSuperclass) this.getBaseElementSpec();
        if (mappedSuperclass.getAttributes() == null) {
            mappedSuperclass.setAttributes(new Attributes());
//            addNewIdAttribute("id");
//            sortAttributes();
        }
        if (mappedSuperclass.getClazz() == null || mappedSuperclass.getClazz().isEmpty()) {
            mappedSuperclass.setClazz(((JPAModelerScene) this.getModelerScene()).getNextClassName("MappedSuperclass_"));
        }
        setName(mappedSuperclass.getClazz());
        setLabel(mappedSuperclass.getClazz());

    }
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:16,代码来源:MappedSuperclassWidget.java

示例9: MappedSuperclassSpecAccessor

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
private MappedSuperclassSpecAccessor(MappedSuperclass mappedSuperclass) {
    this.mappedSuperclass = mappedSuperclass;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:4,代码来源:MappedSuperclassSpecAccessor.java

示例10: getMappedSuperclass

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
/**
 * @return the entity
 */
public MappedSuperclass getMappedSuperclass() {
    return mappedSuperclass;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:7,代码来源:MappedSuperclassSpecAccessor.java

示例11: MappedSuperClassGenerator

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
public MappedSuperClassGenerator(MappedSuperclass parsedMappedSuperclass, String packageName) {
    super(new ManagedClassDefSnippet(), parsedMappedSuperclass.getRootElement().getJavaEEVersion());
    this.mappedSuperclass = parsedMappedSuperclass;
    this.rootPackageName = packageName;
    this.packageName = mappedSuperclass.getAbsolutePackage(rootPackageName);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:7,代码来源:MappedSuperClassGenerator.java

示例12: createBaseElementSpec

import org.netbeans.jpa.modeler.spec.MappedSuperclass; //导入依赖的package包/类
@Override
public MappedSuperclass createBaseElementSpec() {
    return new MappedSuperclass();
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:5,代码来源:MappedSuperclassWidget.java


注:本文中的org.netbeans.jpa.modeler.spec.MappedSuperclass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。