From scm-return-10072-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Sat Jan 21 04:24:56 2006 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 1280 invoked from network); 21 Jan 2006 04:24:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jan 2006 04:24:56 -0000 Received: (qmail 19855 invoked by uid 500); 21 Jan 2006 04:24:55 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 19844 invoked by uid 500); 21 Jan 2006 04:24:55 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 19833 invoked by uid 99); 21 Jan 2006 04:24:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2006 20:24:54 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 20 Jan 2006 20:24:54 -0800 Received: (qmail 1241 invoked by uid 65534); 21 Jan 2006 04:24:33 -0000 Message-ID: <20060121042433.1239.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r370976 [2/2] - in /geronimo/branches/1.0/modules: connector-builder/src/java/org/apache/geronimo/connector/deployment/jsr88/ connector-builder/src/test-resources/ connector-builder/src/test/org/apache/geronimo/connector/deployment/jsr88/ n... Date: Sat, 21 Jan 2006 04:24:31 -0000 To: scm@geronimo.apache.org From: ammulder@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/jsr88/ObjectNameGroup.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/jsr88/ObjectNameGroup.java?rev=370976&view=auto ============================================================================== --- geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/jsr88/ObjectNameGroup.java (added) +++ geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/jsr88/ObjectNameGroup.java Fri Jan 20 20:22:22 2006 @@ -0,0 +1,119 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * 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 org.apache.geronimo.naming.deployment.jsr88; + +import java.io.Serializable; + +/** + * Holds the elements that make up an ObjectName. This class exists + * so that the bundle of elements can be get, set, and edited together + * separate from any other elements that may be on the parent. + * + * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $ + */ +public class ObjectNameGroup implements Serializable { + private String application; + private String domain; + private String module; + private String name; + private String server; + private String type; + + public String getApplication() { + return application; + } + + public void setApplication(String application) { + this.application = application; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public String getModule() { + return module; + } + + public void setModule(String module) { + this.module = module; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public boolean empty() { + return (application == null || application.trim().equals("")) && + (domain == null || domain.trim().equals("")) && + (module == null || module.trim().equals("")) && + (name == null || name.trim().equals("")) && + (server == null || server.trim().equals("")) && + (type == null || type.trim().equals("")); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + final ObjectNameGroup group = (ObjectNameGroup) o; + + if (application != null ? !application.equals(group.application) : group.application != null) return false; + if (domain != null ? !domain.equals(group.domain) : group.domain != null) return false; + if (module != null ? !module.equals(group.module) : group.module != null) return false; + if (name != null ? !name.equals(group.name) : group.name != null) return false; + if (server != null ? !server.equals(group.server) : group.server != null) return false; + if (type != null ? !type.equals(group.type) : group.type != null) return false; + + return true; + } + + public int hashCode() { + int result; + result = (application != null ? application.hashCode() : 0); + result = 29 * result + (domain != null ? domain.hashCode() : 0); + result = 29 * result + (module != null ? module.hashCode() : 0); + result = 29 * result + (name != null ? name.hashCode() : 0); + result = 29 * result + (server != null ? server.hashCode() : 0); + result = 29 * result + (type != null ? type.hashCode() : 0); + return result; + } +} Propchange: geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/jsr88/ObjectNameGroup.java ------------------------------------------------------------------------------ svn:eol-style = native