forked from ysc/APDPlat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
666 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
APDPlat_Module/src/main/java/com/apdplat/module/info/model/InfoTypeContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.apdplat.module.info.model; | ||
|
||
import com.apdplat.platform.annotation.ModelAttr; | ||
import com.apdplat.platform.generator.ActionGenerator; | ||
import com.apdplat.platform.model.Model; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
import javax.persistence.ManyToOne; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlTransient; | ||
import javax.xml.bind.annotation.XmlType; | ||
import org.compass.annotations.Searchable; | ||
import org.compass.annotations.SearchableProperty; | ||
import org.springframework.context.annotation.Scope; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Entity | ||
@Scope("prototype") | ||
@Component | ||
@XmlType(name = "InfoTypeContent") | ||
@Searchable | ||
public class InfoTypeContent extends Model{ | ||
@ManyToOne | ||
@ModelAttr("新闻类别") | ||
protected InfoType infoType; | ||
|
||
@Enumerated(EnumType.STRING) | ||
protected Lang lang; | ||
|
||
@SearchableProperty | ||
@ModelAttr("类别名称") | ||
protected String infoTypeName; | ||
|
||
|
||
@XmlAttribute | ||
public Lang getLang() { | ||
return lang; | ||
} | ||
|
||
public void setLang(Lang lang) { | ||
this.lang = lang; | ||
} | ||
|
||
@XmlTransient | ||
public InfoType getInfoType() { | ||
return infoType; | ||
} | ||
|
||
public void setInfoType(InfoType infoType) { | ||
this.infoType = infoType; | ||
} | ||
|
||
@XmlAttribute | ||
public String getInfoTypeName() { | ||
return infoTypeName; | ||
} | ||
|
||
public void setInfoTypeName(String infoTypeName) { | ||
this.infoTypeName = infoTypeName; | ||
} | ||
|
||
|
||
|
||
@Override | ||
public String getMetaData() { | ||
return "新闻类别多语言内容"; | ||
} | ||
public static void main(String[] args){ | ||
InfoTypeContent obj=new InfoTypeContent(); | ||
//生成Action | ||
ActionGenerator.generate(obj.getClass()); | ||
} | ||
} |
Oops, something went wrong.