[richfaces-svn-commits] JBoss Rich Faces SVN: r661 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid: model and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Sat May 5 12:00:03 EDT 2007
Author: abelevich
Date: 2007-05-05 12:00:02 -0400 (Sat, 05 May 2007)
New Revision: 661
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,238 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Channel.java,v $
+ * $Revision: 1.8 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Channel {
+
+ private static final Comparator<Issue> byIdDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o2.getIndex() - o1.getIndex();
+ }
+ };
+ private static final Comparator<Issue> byIdAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o1.getIndex() - o2.getIndex();
+ }
+ };
+
+ private static final Comparator<Issue> byPriAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o1.getPriority().getId() - o2.getPriority().getId();
+ }
+ };
+ private static final Comparator<Issue> byPriDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o2.getPriority().getId() - o1.getPriority().getId();
+ }
+ };
+
+ private static final Comparator<JiraUser> jiraUserComparator = new Comparator<JiraUser> () {
+ public int compare(JiraUser o1, JiraUser o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ };
+
+ private static final Comparator<Issue> byAssigneeAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getAssignee(), o2.getAssignee());
+ }
+ };
+ private static final Comparator<Issue> byAssigneeDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return -byAssigneeAsc.compare(o1, o2);
+ }
+ };
+
+ static final Comparator<Issue> byReporterAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getReporter(), o2.getReporter());
+ }
+ };
+ static final Comparator<Issue> byReporterDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return -byReporterAsc.compare(o1, o2);
+ }
+ };
+
+ static final Comparator<Issue> byStatusAsc = new Comparator<Issue>() {
+ public int compare(Issue o1, Issue o2) {
+ return o1.getStatus().getId() - o2.getStatus().getId();
+ };
+ };
+
+ static final Comparator<Issue> byStatusDesc = new Comparator<Issue>() {
+ public int compare(Issue o1, Issue o2) {
+ return -byStatusAsc.compare(o1, o2);
+ };
+ };
+
+
+ private List<Issue> issues = new ArrayList<Issue>();
+ private String title;
+ private String description;
+ private String link;
+ private String language;
+
+ private Map <Integer, Issue> index = new HashMap<Integer, Issue>();
+
+
+
+
+ public int size() {
+ return issues.size();
+ }
+
+ /**
+ * Execute query. Care for sorting
+ * @param startRow
+ * @param endRow
+ * @param sortOrder
+ * @return
+ */
+// public List <Issue> executeQuery(int startRow, int endRow, SortOrder sortOrder) {
+// System.out.println("Channel.executeQuery()");
+// List <Issue> copy = getIssues();
+// if (sortOrder != null) {
+// copy = new ArrayList<Issue>(getIssues());
+// Comparator<Issue> comparator = createComparator(sortOrder);
+// if (comparator != null) {
+// Collections.sort(copy, comparator);
+// }
+// }
+// List <Issue> issuz = new ArrayList<Issue>(endRow - startRow + 1);
+// for(int i = startRow; i < endRow; i++ ) {
+// issuz.add(copy.get(i));
+// }
+// return issuz;
+// }
+
+
+ /**
+ * @return the language
+ */
+ public String getLanguage() {
+ return language;
+ }
+ /**
+ * @param language the language to set
+ */
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * @return the link
+ */
+ public String getLink() {
+ return link;
+ }
+ /**
+ * @param link the link to set
+ */
+ public void setLink(String link) {
+ this.link = link;
+ }
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ /**
+ * @return the issues
+ */
+ public List<Issue> getIssues() {
+ return issues;
+ }
+ /**
+ * @param issues the issues to set
+ */
+ public void setIssues(List<Issue> issues) {
+ this.issues = issues;
+ }
+
+ public void addIssue(Issue issue) {
+ issues.add(issue);
+ index.put(issue.getIndex(), issue);
+ }
+ /**
+ * @return the index
+ */
+ public Map<Integer, Issue> getIndex() {
+ return index;
+ }
+ /**
+ * @param index the index to set
+ */
+ public void setIndex(Map<Integer, Issue> index) {
+ this.index = index;
+ }
+
+// protected Comparator <Issue> createComparator(SortOrder sortOrder) {
+// String prop = sortOrder.getSortField();
+// boolean asc = sortOrder.isAscending();
+//
+// if ("priority".equals(prop)) {
+// return asc ? byPriAsc : byPriDesc;
+// } else if ("assignee".equals(prop)) {
+// return asc ? byAssigneeAsc : byAssigneeDesc;
+// } else if ("reporter".equals(prop)) {
+// return asc ? byReporterAsc : byReporterDesc;
+// } else if ("id".equals(prop)) {
+// return asc ? byIdAsc : byIdDesc;
+//
+// } else if ("status".equals(prop)) {
+// return asc ? byStatusAsc : byStatusDesc;
+//
+// }
+//
+// return null;
+// }
+//
+ public Issue findById(Integer id) {
+ return getIndex().get(id);
+ }
+
+ public void replace(Integer id, List<Issue> list) {
+ Issue issue = issues.get(id.intValue());
+ issues.removeAll(list);
+ issues.addAll(issues.indexOf(issue)+1, list);
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,376 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Issue.java,v $
+ * $Revision: 1.6 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Issue {
+ private static int issueIndex = 0;
+
+ private int index = ++issueIndex;
+
+ private String title;
+ private String link;
+ private String description;
+ private String environment;
+ private Key key;
+ private Type type;
+ private Priority priority;
+ private JiraUser assignee;
+ private JiraUser reporter;
+ private String summary;
+ private Status status;
+ private String resolution;
+ private String created;
+ private String updated;
+ private String version;
+ private String component;
+ private String due;
+ private String votes;
+ private String customfields;
+
+ //TODO: provide correct mapping
+ private String comments;
+ private String fixVersion;
+ private String timeestimate;
+ private String timespent;
+
+ //TODO: provide correct mapping
+ private String issuelinks;
+
+ private String timeoriginalestimate;
+
+ /**
+ * @return the timeoriginalestimate
+ */
+ public String getTimeoriginalestimate() {
+ return timeoriginalestimate;
+ }
+ /**
+ * @param timeoriginalestimate the timeoriginalestimate to set
+ */
+ public void setTimeoriginalestimate(String timeoriginalestimate) {
+ this.timeoriginalestimate = timeoriginalestimate;
+ }
+ /**
+ * @return the timespent
+ */
+ public String getTimespent() {
+ return timespent;
+ }
+ /**
+ * @param timespent the timespent to set
+ */
+ public void setTimespent(String timespent) {
+ this.timespent = timespent;
+ }
+ /**
+ * @return the comments
+ */
+ public String getComments() {
+ return comments;
+ }
+ /**
+ * @param comments the comments to set
+ */
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+ /**
+ * @return the customfields
+ */
+ public String getCustomfields() {
+ return customfields;
+ }
+ /**
+ * @param customfields the customfields to set
+ */
+ public void setCustomfields(String customfields) {
+ this.customfields = customfields;
+ }
+ /**
+ * @return the votes
+ */
+ public String getVotes() {
+ return votes;
+ }
+ /**
+ * @param votes the votes to set
+ */
+ public void setVotes(String votes) {
+ this.votes = votes;
+ }
+ /**
+ * @return the due
+ */
+ public String getDue() {
+ return due;
+ }
+ /**
+ * @param due the due to set
+ */
+ public void setDue(String due) {
+ this.due = due;
+ }
+ /**
+ * @return the component
+ */
+ public String getComponent() {
+ return component;
+ }
+ /**
+ * @param component the component to set
+ */
+ public void setComponent(String component) {
+ this.component = component;
+ }
+ /**
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+ /**
+ * @param version the version to set
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+ /**
+ * @return the created
+ */
+ public String getCreated() {
+ return created;
+ }
+ /**
+ * @param created the created to set
+ */
+ public void setCreated(String created) {
+ this.created = created;
+ }
+ /**
+ * @return the updated
+ */
+ public String getUpdated() {
+ return updated;
+ }
+ /**
+ * @param updated the updated to set
+ */
+ public void setUpdated(String updated) {
+ this.updated = updated;
+ }
+ /**
+ * @return the resolution
+ */
+ public String getResolution() {
+ return resolution;
+ }
+ /**
+ * @param resolution the resolution to set
+ */
+ public void setResolution(String resolution) {
+ this.resolution = resolution;
+ }
+ /**
+ * @return the status
+ */
+ public Status getStatus() {
+ return status;
+ }
+ /**
+ * @param status the status to set
+ */
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+ /**
+ * @return the summary
+ */
+ public String getSummary() {
+ return summary;
+ }
+ /**
+ * @param summary the summary to set
+ */
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+ /**
+ * @return the assignee
+ */
+ public JiraUser getAssignee() {
+ return assignee;
+ }
+ /**
+ * @param assignee the assignee to set
+ */
+ public void setAssignee(JiraUser assignee) {
+ this.assignee = assignee;
+ }
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ /*if (description != null && description.length() > 2000) {
+ description = description.substring(0, 2000);
+ }*/
+ this.description = description;
+ }
+ /**
+ * @return the environment
+ */
+ public String getEnvironment() {
+ return environment;
+ }
+ /**
+ * @param environment the environment to set
+ */
+ public void setEnvironment(String environment) {
+ this.environment = environment;
+ }
+ /**
+ * @return the key
+ */
+ public Key getKey() {
+ return key;
+ }
+ /**
+ * @param key the key to set
+ */
+ public void setKey(Key key) {
+ this.key = key;
+ }
+ /**
+ * @return the link
+ */
+ public String getLink() {
+ return link;
+ }
+ /**
+ * @param link the link to set
+ */
+ public void setLink(String link) {
+ this.link = link;
+ }
+ /**
+ * @return the priority
+ */
+ public Priority getPriority() {
+ return priority;
+ }
+ /**
+ * @param priority the priority to set
+ */
+ public void setPriority(Priority priority) {
+ this.priority = priority;
+ }
+ /**
+ * @return the reporter
+ */
+ public JiraUser getReporter() {
+ return reporter;
+ }
+ /**
+ * @param reporter the reporter to set
+ */
+ public void setReporter(JiraUser reporter) {
+ this.reporter = reporter;
+ }
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ /**
+ * @return the type
+ */
+ public Type getType() {
+ return type;
+ }
+ /**
+ * @param type the type to set
+ */
+ public void setType(Type type) {
+ this.type = type;
+ }
+ /**
+ * @return the fixVersion
+ */
+ public String getFixVersion() {
+ return fixVersion;
+ }
+ /**
+ * @param fixVersion the fixVersion to set
+ */
+ public void setFixVersion(String fixVersion) {
+ this.fixVersion = fixVersion;
+ }
+ /**
+ * @return the timeestimate
+ */
+ public String getTimeestimate() {
+ return timeestimate;
+ }
+ /**
+ * @param timeestimate the timeestimate to set
+ */
+ public void setTimeestimate(String timeestimate) {
+ this.timeestimate = timeestimate;
+ }
+ /**
+ * @return the issuelinks
+ */
+ public String getIssuelinks() {
+ return issuelinks;
+ }
+ /**
+ * @param issuelinks the issuelinks to set
+ */
+ public void setIssuelinks(String issuelinks) {
+ this.issuelinks = issuelinks;
+ }
+ /**
+ * @return the index
+ */
+ public int getIndex() {
+ return index;
+ }
+ /**
+ * @param index the index to set
+ */
+ public void setIndex(int index) {
+ this.index = index;
+ }
+ /**
+ * @return
+ * @see com.exadel.jsf.demo.datagrid.model.Priority#getId()
+ */
+ public int getPriorityId() {
+ return getPriority().getId();
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,45 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/JiraUser.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class JiraUser {
+ private String username;
+ private String name;
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return the username
+ */
+ public String getUsername() {
+ return username;
+ }
+ /**
+ * @param username the username to set
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,51 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Key.java,v $
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Key implements Comparable<Key>{
+ private int id;
+ private String value;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the value
+ */
+ public String getValue() {
+ return value;
+ }
+ /**
+ * @param value the value to set
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Key o) {
+ return id - o.id;
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,64 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Priority.java,v $
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Priority {
+ private int id;
+ private String name;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Priority) {
+ Priority priority = (Priority) obj;
+ return priority.id == id;
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id;
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,19 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Rss.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Rss {
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,64 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Status.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Status {
+ private String name;
+ private int id;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Status) {
+ Status status = (Status) obj;
+ return status.id == id;
+ }
+ return false;
+ }
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,44 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Type.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Type {
+ private int id;
+ private String name;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
More information about the richfaces-svn-commits
mailing list