Sha256: a98d09fe82ac6a5ed7163a4381f84740ab07b0ccd3e14430dde1be454402862e

Contents?: true

Size: 613 Bytes

Versions: 2

Compression:

Stored size: 613 Bytes

Contents

package <%= models_base_package %>;

public class <%= class_name %> {

<% for attribute in attributes -%>
<% if attribute.type == :has_one -%>
  <%= attribute.name.classify %> <%= attribute.name %>;
<% elsif attribute.type == :has_many -%>
  public java.util.List<<%= attribute.name.classify %>> <%= attribute.name %>;
<% else -%>
  public <%= type_map[attribute.type] || attribute.type.to_s.classify %> <%= attribute.name.classify.sub(/^(.)/){ $1.downcase } %>;
<% end -%>

<% end -%>
<% if options[:timestamps] %>
  //TODO timestamps

<% end -%>
<% if options[:modified_by] %>
  //TODO modified_by

<% end -%>
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resty-generators-0.2.0 lib/generators/resty/templates/Model.java
resty-generators-0.1.0 lib/generators/resty/templates/Model.java