001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 package org.apache.geronimo.console.databasemanager; 019 020 import javax.management.ObjectName; 021 022 public class DataSourceInfo implements Comparable { 023 private ObjectName objectName; 024 025 private String name; 026 027 private Integer state; 028 029 private boolean working; 030 031 private String message; 032 033 public ObjectName getObjectName() { 034 return objectName; 035 } 036 037 public void setObjectName(ObjectName objectName) { 038 this.objectName = objectName; 039 } 040 041 public String getName() { 042 return name; 043 } 044 045 public void setName(String name) { 046 this.name = name; 047 } 048 049 public Integer getState() { 050 return state; 051 } 052 053 public void setState(Integer state) { 054 this.state = state; 055 } 056 057 public int compareTo(Object o) { 058 return name.compareToIgnoreCase(((DataSourceInfo) o).name); 059 } 060 061 public boolean isWorking() { 062 return working; 063 } 064 065 public void setWorking(boolean working) { 066 this.working = working; 067 } 068 069 public String getMessage() { 070 return message; 071 } 072 073 public void setMessage(String message) { 074 this.message = message; 075 } 076 }