
package com.codice.cm;

import java.lang.*;
import java.util.*;

class Info {

    class InRep {
        @Serializable
        public class ObjectInRepInfo extends ObjectInfo {
            public long tepId = -1;
            public long id = -1;

            public ObjectInRepInfo() { }

            public ObjectInRepInfo(long id) {
                this.id = id;
            }

            @Override
            public boolean Equals(object obj) {
                if (!(obj.getClass().equals(ObjectInRepInfo.class))) {
                    return false;
                }

                ObjectInRepInfo repObj = (ObjectInRepInfo) obj;

                if (repId != repObj.repId) {
                    return false;
                }

                if (id != repObj.id) {
                    return false;
                }

                return super.equals(obj);
            }

            @Override
            public int hashCode()
            {
                return super.hashCode();
            }
        }
    }
    
    class Rep {
    
        @Serializable
        public class RepositoryServerInfo extends ObjectInfo {
            public string serverName;

            @Override
            public boolean equals(object obj) {
                if (!(obj.getClass().equals(RepositoryServerInfo.class))) {
                    return false;
                }

                RepositoryServerInfo repObj = (RepositoryServerInfo) obj;
                if (ServerLocator.get().areSameServer(serverName, repObj.serverName)) {
                    return false;
                }

                return super.equals(obj);
            }

            @Override
            public int hashCode()
            {
                return super.hashCode();
            }
        }

    }
}