/* * Copyright 2010 The Ganshane Team. * * 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. */ package corner.orm.base; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; import org.apache.tapestry5.beaneditor.NonVisual; /** * 基础模型类。 * @author <a href="mailto:jun.tsai@ganshane.net">Jun Tsai</a> * @version $Revision$ * @since 0.0.1 */ @MappedSuperclass public class BaseEntity implements java.io.Serializable{ private static final long serialVersionUID = 1L; private Long id; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @NonVisual public Long getId() { return id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /* bean properties begin */ public static final String ID_PRO_NAME="id"; /* bean properties end */ }