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, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 020package org.apache.isis.core.metamodel.adapter.util; 021 022import java.util.List; 023 024import org.apache.isis.core.metamodel.adapter.ObjectAdapter; 025 026public class AdapterUtils { 027 028 private AdapterUtils() { 029 } 030 031 /** 032 * @deprecated - use {@link ObjectAdapter.Util#exists(ObjectAdapter)} 033 */ 034 @Deprecated 035 public static boolean exists(final ObjectAdapter adapter) { 036 return ObjectAdapter.Util.exists(adapter); 037 } 038 039 /** 040 * @deprecated - use {@link ObjectAdapter.Util#wrappedEqual(ObjectAdapter, ObjectAdapter)} 041 */ 042 @Deprecated 043 public static boolean wrappedEqual(final ObjectAdapter adapter1, final ObjectAdapter adapter2) { 044 return ObjectAdapter.Util.wrappedEqual(adapter1, adapter2); 045 } 046 047 /** 048 * @deprecated - use {@link ObjectAdapter.Util#unwrap(ObjectAdapter)} 049 */ 050 @Deprecated 051 public static Object unwrap(final ObjectAdapter adapter) { 052 return ObjectAdapter.Util.unwrap(adapter); 053 } 054 055 /** 056 * @deprecated - use {@link ObjectAdapter.Util#unwrap(ObjectAdapter[])} 057 */ 058 public static Object[] unwrap(final ObjectAdapter[] adapters) { 059 return ObjectAdapter.Util.unwrap(adapters); 060 } 061 062 /** 063 * @deprecated - use {@link ObjectAdapter.Util#unwrapT(List)} 064 */ 065 @Deprecated 066 public static <T> List<T> unwrap(final List<ObjectAdapter> adapters) { 067 return ObjectAdapter.Util.unwrapT(adapters); 068 } 069 070 /** 071 * @deprecated - use {@link ObjectAdapter.Util#titleString(ObjectAdapter)} 072 */ 073 @Deprecated 074 public static String titleString(final ObjectAdapter adapter) { 075 return ObjectAdapter.Util.titleString(adapter); 076 } 077 078 /** 079 * @deprecated - use {@link ObjectAdapter.Util#nullSafeEquals(Object, Object)} 080 */ 081 @Deprecated 082 public static boolean nullSafeEquals(final Object obj1, final Object obj2) { 083 return ObjectAdapter.Util.nullSafeEquals(obj1, obj2); 084 } 085 086}