001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie.dependency.hcat; 020 021import java.io.Serializable; 022 023public class WaitingAction implements Serializable { 024 025 private static final long serialVersionUID = 1L; 026 private String actionID; 027 private String dependencyURI; 028 029 public WaitingAction(String actionID, String dependencyURI) { 030 this.actionID = actionID; 031 this.dependencyURI = dependencyURI; 032 } 033 034 /** 035 * Get the action id 036 * @return action id 037 */ 038 public String getActionID() { 039 return actionID; 040 } 041 042 /** 043 * Get the dependency uri 044 * @return dependency uri 045 */ 046 public String getDependencyURI() { 047 return dependencyURI; 048 } 049 050 @Override 051 public int hashCode() { 052 final int prime = 31; 053 int result = prime + ((actionID == null) ? 0 : actionID.hashCode()); 054 result = prime * result + ((dependencyURI == null) ? 0 : dependencyURI.hashCode()); 055 return result; 056 } 057 058 @Override 059 public boolean equals(Object obj) { 060 if (this == obj) 061 return true; 062 if (obj == null) 063 return false; 064 WaitingAction other = (WaitingAction) obj; 065 return actionID.equals(other.actionID) && dependencyURI.equals(other.dependencyURI); 066 } 067 068 @Override 069 public String toString() { 070 return "WaitingAction [actionID=" + actionID + ", dependencyURI=" + dependencyURI + "]"; 071 } 072}