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 package org.apache.oozie.dependency.hcat; 019 020 import java.io.Serializable; 021 022 public class WaitingAction implements Serializable { 023 024 private static final long serialVersionUID = 1L; 025 private String actionID; 026 private String dependencyURI; 027 028 public WaitingAction(String actionID, String dependencyURI) { 029 this.actionID = actionID; 030 this.dependencyURI = dependencyURI; 031 } 032 033 /** 034 * Get the action id 035 * @return action id 036 */ 037 public String getActionID() { 038 return actionID; 039 } 040 041 /** 042 * Get the dependency uri 043 * @return dependency uri 044 */ 045 public String getDependencyURI() { 046 return dependencyURI; 047 } 048 049 @Override 050 public int hashCode() { 051 final int prime = 31; 052 int result = prime + ((actionID == null) ? 0 : actionID.hashCode()); 053 result = prime * result + ((dependencyURI == null) ? 0 : dependencyURI.hashCode()); 054 return result; 055 } 056 057 @Override 058 public boolean equals(Object obj) { 059 if (this == obj) 060 return true; 061 if (obj == null) 062 return false; 063 WaitingAction other = (WaitingAction) obj; 064 return actionID.equals(other.actionID) && dependencyURI.equals(other.dependencyURI); 065 } 066 067 @Override 068 public String toString() { 069 return "WaitingAction [actionID=" + actionID + ", dependencyURI=" + dependencyURI + "]"; 070 } 071 }