powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / GWT Bean Clone
2 сообщений из 2, страница 1 из 1
GWT Bean Clone
    #37620783
Фотография -=Koba=-
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Как правильно клонировать бины???

Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
/*
 * Copyright 2011 Ocsico Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.ocsico.cm4.client.model.rest;

import name.pehl.piriti.commons.client.Path;
import name.pehl.piriti.json.client.JsonReader;
import name.pehl.piriti.json.client.JsonWriter;

import com.google.gwt.core.client.GWT;
import com.ocsico.cm4.client.model.IBean;

/**
 * Организация
 * 
 * @author d.valchuk
 * 
 */
public class Org implements IBean, Cloneable {

  @Override
  public String toString() {
    return "Org [orgname=" + orgname + ", orgunit=" + orgunit + "]";
  }

  public interface BeanReader extends JsonReader<Org> {
  }

  public interface BeanWriter extends JsonWriter<Org> {
  }

  public static final BeanReader JSON_READER = GWT.create(BeanReader.class);
  public static final BeanWriter JSON_WRITER = GWT.create(BeanWriter.class);

  @Path("org-name")
  private String                 orgname;
  @Path("org-unit")
  private String                 orgunit;

  public Org() {
  }

  /**
   * @return the orgname
   */
  public String getOrgname() {
    return orgname;
  }

  /**
   * @return the orgunit
   */
  public String getOrgunit() {
    return orgunit;
  }

  /**
   * @param orgname
   *          the orgname to set
   */
  public void setOrgname(String orgname) {
    this.orgname = orgname;
  }

  /**
   * @param orgunit
   *          the orgunit to set
   */
  public void setOrgunit(String orgunit) {
    this.orgunit = orgunit;
  }

  @Override
  public Object clone() {
    try {
      return super.clone();
    }
    catch (CloneNotSupportedException e) {
      throw new Error("Org.clone");
    }
  }
}
...
Рейтинг: 0 / 0
GWT Bean Clone
    #37620790
Фотография Blazkowicz
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / GWT Bean Clone
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]