Sha256: 63129197cdd450124ed7a4941c84e7dd7017acfb4be270ddd027af8d76a2cac1

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

/**
 * 
 */
package <%= package %>.models;


import de.saumya.gwt.persistence.client.Repository;
import de.saumya.gwt.persistence.client.ResourceFactory;
import de.saumya.gwt.persistence.client.ResourceNotifications;

<% unless options[:skip_modified_by] -%>
import de.saumya.gwt.session.client.models.UserFactory;
<% end -%>

public class <%= class_name %>Factory extends ResourceFactory<<%= class_name %>> {

<% unless options[:skip_modified_by] -%>
    private final UserFactory userFactory;

<% end -%>
    public <%= class_name %>Factory(final Repository repository,
            final ResourceNotifications notifications<% unless options[:skip_modified_by] -%>,
            final UserFactory userFactory<% end -%>) {
        super(repository, notifications);
<% unless options[:skip_modified_by] -%>
        this.userFactory = userFactory;
<% end -%>
    }

    @Override
    public String keyName() {
        return "id";
    }

    @Override
    public <%= class_name %> newResource() {
        return new <%= class_name %>(this.repository, this<% unless options[:skip_modified_by] -%>, this.userFactory<% end -%>);
    }

    @Override
    public String storageName() {
        return "<%= singular_name %>";
    }

    @Override
    public String defaultSearchParameterName() {
        return null;
    }

}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ixtlan-0.2.4 generators/gwt_ixtlan_datamapper_rspec_scaffold/templates/ModelFactory.java
ixtlan-0.2.3 generators/gwt_ixtlan_datamapper_rspec_scaffold/templates/ModelFactory.java
ixtlan-0.2.2 generators/gwt_ixtlan_datamapper_rspec_scaffold/templates/ModelFactory.java