attributestruct.java

来自「一个java 代码生成器」· Java 代码 · 共 83 行

JAVA
83
字号
/**
 * Copyright (c) 2002, Siddhartha P. Chandurkar siddhartha@visioncodified.com
 * All rights reserved.
 * Licensed under the Academic Free License version 1.1
 * See the file LICENSE.TXT for details.
 * LICENSE.txt is located in the directory  <install-directory>\Jenerator
 * of your Jenertaor Installation.
 *
 */
package com.jenerator.struct.ejb;

/**
 * AttributeStruct
 * This class is a Datastructure which holds  the information of a Bean.
 *
 * @author Siddhartha P. Chandurkar
 * @version 0.9.0
 */
public class AttributeStruct {

    //ATTRIBUTES
    private String name;
    private String originalName;
    private String type;
    private boolean bPrimKey;


    //CONSTRUCTOR
    public AttributeStruct(String _name, String _type, String _originalName, String primKey) {
        name = _name;
        type = _type;
        originalName = _originalName;
        if (primKey.endsWith("true"))
            bPrimKey = true;
        else
            bPrimKey = false;
    }

    public AttributeStruct(String _name, String _type, String _originalName) {
        name = _name;
        type = _type;
        originalName = _originalName;
    }

    public AttributeStruct(String _name, String _type) {
        name = _name;
        type = _type;
    }

    //METHODS
    public boolean isBPrimKey() {
        return bPrimKey;
    }

    public void setBPrimKey(boolean bPrimKey) {
        this.bPrimKey = bPrimKey;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setOriginalName(String originalName) {
        this.originalName = originalName;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public String getOriginalName() {
        return originalName;
    }

    public String getType() {
        return type;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?