Sha256: 0ced49ce46086cd48881677207094d28764ea4e917e8906c5a3d6921dc19af44
Contents?: true
Size: 952 Bytes
Versions: 4
Compression:
Stored size: 952 Bytes
Contents
package <%=@package%>.model; <%=@licence%> <%=@annotation_import%> /** * Entity that represents <%=@model_name%>s. * @author <%=@user_name%> */ <%=@entity_annotation%> public class <%=@model_name%> extends BaseEntity { <%@attributes.each do |attribute| %>private <%="#{attribute.data_type} #{attribute.name}"%>; <%end%> public <%=@model_name%>(){} /** * a convenience constructor. */ public <%=@model_name%>(<%=@attributes.map {|attribute| "#{attribute.data_type} #{attribute.name}"}.join(',')%>) { <%@attributes.each do |attribute|%>this.<%=attribute.name%> = <%=attribute.name%>; <%end%> } <%@attributes.each do |attribute| %> public void <%="set#{attribute.name.capitalize}(#{attribute.data_type} #{attribute.name})"%> { this.<%=attribute.name%> = <%=attribute.name%>; } public <%="#{attribute.data_type} get#{attribute.name.capitalize}"%>() { return this.<%=attribute.name%>; } <%end%> }
Version data entries
4 entries across 4 versions & 1 rubygems