/*
 * Copyright (c) 2005-2010 Grameen Foundation USA
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * See also http://www.apache.org/licenses/LICENSE-2.0.html for an
 * explanation of the license and how it is applied.
 */

package org.mifos.accounts.business;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.mifos.accounts.util.helpers.AccountTypes;
import org.mifos.framework.business.AbstractEntity;

/**
 * This class depicts the different account types. Obsolete; replaced by
 * {@link AccountTypes}.
 */
@Entity
@Table(name = "ACCOUNT_TYPE")
public class AccountTypeEntity extends AbstractEntity {

    @Id
    @GeneratedValue
    @Column(name = "ACCOUNT_TYPE_ID", nullable = false)
    private Short accountTypeId;

    @Column(name = "DESCRIPTION")
    private String description;

    @Column(name = "LOOKUP_ID", nullable = false)
    private Integer lookUpId;

    public AccountTypeEntity() {
    }

    public AccountTypeEntity(Integer lookUpId) {
        this.lookUpId = lookUpId;
    }

    public AccountTypeEntity(String description, Integer lookUpId) {
        this.description = description;
        this.lookUpId = lookUpId;
    }

    public AccountTypeEntity(Short accountTypeId) {
        this.accountTypeId = accountTypeId;
    }

    public Short getAccountTypeId() {
        return this.accountTypeId;
    }

    public void setAccountTypeId(Short accountTypeId) {
        this.accountTypeId = accountTypeId;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getLookUpId() {
        return this.lookUpId;
    }

    public void setLookUpId(Integer lookUpId) {
        this.lookUpId = lookUpId;
    }

}

@@ -798,41 +798,8 @@
 s;%0A%0A
-import javax.persistence.Column;%0A
 impo
@@ -928,16 +928,61 @@
 e.Table;
+%0Aimport javax.validation.constraints.NotNull;
 %0A%0Aimport
@@ -1319,209 +1319,95 @@
    @
-Column(name = %22ACCOUNT_TYPE_ID%22, nullable = false)%0A    private Short accountTypeId;%0A%0A    @Column(name = %22DESCRIPTION%22)%0A    private String description;%0A%0A    @Column(name = %22LOOKUP_ID%22, nullable = false)
+NotNull%0A    private Short accountTypeId;%0A%0A    private String description;%0A%0A    @NotNull
 %0A   
@@ -1423,25 +1423,25 @@
 Integer look
-U
+u
 pId;%0A%0A    pu
@@ -1532,33 +1532,33 @@
        this.look
-U
+u
 pId = lookUpId;%0A
@@ -1682,33 +1682,33 @@
        this.look
-U
+u
 pId = lookUpId;%0A
@@ -2236,25 +2236,25 @@
 rn this.look
-U
+u
 pId;%0A    %7D%0A%0A
@@ -2318,17 +2318,17 @@
 his.look
-U
+u
 pId = lo

Use Bean Validation annotation for POC.