inlinecontent.java.svn-base
来自「EJB3 Annotation Sample」· SVN-BASE 代码 · 共 113 行
SVN-BASE
113 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.s7turn.content.entities;import com.s7turn.sdk.content.ContentInfo;import java.io.Serializable;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.Table;/** * * @author Long */@Entity@Table( name = "inline_contents")@NamedQueries({ @NamedQuery( name= "Content.findInlineContentsByResourceId", query = "SELECT ic FROM InlineContent ic WHERE ic.resourceId = :resourceId AND ic.locale = :locale" )})public class InlineContent implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) @Column( name = "content_id" ) private Long id; @Column( name = "locale" ) private String locale; @Column( name = "content" ) private String body; @Column( name = "content_key" ) private String contentKey; @Column( name = "resource_id" ) private String resourceId; public void setId(Long id) { this.id = id; } public String getBody() { return body; } public void setBody(String body) { this.body = body; } public String getContentKey() { return contentKey; } public void setContentKey(String contentKey) { this.contentKey = contentKey; } public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } public String getResourceId() { return resourceId; } public void setResourceId(String resourceId) { this.resourceId = resourceId; } public Long getId() { return id; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof InlineContent)) { return false; } InlineContent other = (InlineContent) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "com.s7turn.content.entities.InlineContent[id=" + id + "]"; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?