|
17 | 17 | package io.objectbox; |
18 | 18 |
|
19 | 19 | import java.io.Serializable; |
20 | | -import java.util.Collection; |
21 | 20 | import java.util.Date; |
22 | 21 |
|
23 | 22 | import javax.annotation.Nullable; |
|
39 | 38 | import io.objectbox.query.PropertyQueryConditionImpl.StringArrayCondition; |
40 | 39 | import io.objectbox.query.PropertyQueryConditionImpl.StringCondition; |
41 | 40 | import io.objectbox.query.PropertyQueryConditionImpl.StringCondition.Operation; |
42 | | -import io.objectbox.query.PropertyQueryConditionImpl.StringStringCondition; |
43 | | -import io.objectbox.query.PropertyQueryConditionImpl.StringLongCondition; |
44 | 41 | import io.objectbox.query.PropertyQueryConditionImpl.StringDoubleCondition; |
| 42 | +import io.objectbox.query.PropertyQueryConditionImpl.StringLongCondition; |
| 43 | +import io.objectbox.query.PropertyQueryConditionImpl.StringStringCondition; |
45 | 44 | import io.objectbox.query.Query; |
46 | 45 | import io.objectbox.query.QueryBuilder.StringOrder; |
47 | 46 |
|
@@ -721,133 +720,6 @@ public PropertyQueryCondition<ENTITY> lessOrEqual(byte[] value) { |
721 | 720 | return new ByteArrayCondition<>(this, ByteArrayCondition.Operation.LESS_OR_EQUAL, value); |
722 | 721 | } |
723 | 722 |
|
724 | | - ////// |
725 | | - // Note: The following are deprecated conditions used with DAOcompat only. |
726 | | - // They exist so library users need not update their code where new conditions are named differently. |
727 | | - ////// |
728 | | - |
729 | | - /** |
730 | | - * Creates an "equal ('=')" condition for this property. |
731 | | - * |
732 | | - * @deprecated Use {@link #equal} instead. |
733 | | - */ |
734 | | - @Deprecated |
735 | | - public PropertyQueryCondition<ENTITY> eq(Object value) { |
736 | | - if (value instanceof Long) { |
737 | | - return equal((Long) value); |
738 | | - } else if (value instanceof Integer) { |
739 | | - return equal((Integer) value); |
740 | | - } else if (value instanceof String) { |
741 | | - return equal((String) value); |
742 | | - } else { |
743 | | - throw new IllegalArgumentException("Only LONG, INTEGER or STRING values are supported."); |
744 | | - } |
745 | | - } |
746 | | - |
747 | | - /** |
748 | | - * Creates an "not equal ('<>')" condition for this property. |
749 | | - * |
750 | | - * @deprecated Use {@link #notEqual} instead. |
751 | | - */ |
752 | | - @Deprecated |
753 | | - public PropertyQueryCondition<ENTITY> notEq(Object value) { |
754 | | - if (value instanceof Long) { |
755 | | - return notEqual((Long) value); |
756 | | - } else if (value instanceof Integer) { |
757 | | - return notEqual((Integer) value); |
758 | | - } else if (value instanceof String) { |
759 | | - return notEqual((String) value); |
760 | | - } else { |
761 | | - throw new IllegalArgumentException("Only LONG, INTEGER or STRING values are supported."); |
762 | | - } |
763 | | - } |
764 | | - |
765 | | - /** |
766 | | - * Creates an "IN (..., ..., ...)" condition for this property. |
767 | | - * |
768 | | - * @deprecated Use {@link #oneOf} instead. |
769 | | - */ |
770 | | - @Deprecated |
771 | | - public PropertyQueryCondition<ENTITY> in(Object... values) { |
772 | | - // just check the first value and assume all others are of the same type |
773 | | - // maybe this is too naive and we should properly check values earlier |
774 | | - if (values[0] instanceof Long) { |
775 | | - long[] inValues = new long[values.length]; |
776 | | - for (int i = 0; i < values.length; i++) { |
777 | | - inValues[i] = (long) values[i]; |
778 | | - } |
779 | | - return oneOf(inValues); |
780 | | - } else if (values[0] instanceof Integer) { |
781 | | - int[] inValues = new int[values.length]; |
782 | | - for (int i = 0; i < values.length; i++) { |
783 | | - inValues[i] = (int) values[i]; |
784 | | - } |
785 | | - return oneOf(inValues); |
786 | | - } else { |
787 | | - throw new IllegalArgumentException("The IN condition only supports LONG or INTEGER values."); |
788 | | - } |
789 | | - } |
790 | | - |
791 | | - /** |
792 | | - * Creates an "IN (..., ..., ...)" condition for this property. |
793 | | - * |
794 | | - * @deprecated Use {@link #oneOf} instead. |
795 | | - */ |
796 | | - @Deprecated |
797 | | - public PropertyQueryCondition<ENTITY> in(Collection<?> inValues) { |
798 | | - return in(inValues.toArray()); |
799 | | - } |
800 | | - |
801 | | - /** |
802 | | - * Creates an "greater than ('>')" condition for this property. |
803 | | - * |
804 | | - * @deprecated Use {@link #greater} instead. |
805 | | - */ |
806 | | - @Deprecated |
807 | | - public PropertyQueryCondition<ENTITY> gt(Object value) { |
808 | | - if (value instanceof Long) { |
809 | | - return greater((Long) value); |
810 | | - } else if (value instanceof Integer) { |
811 | | - return greater((Integer) value); |
812 | | - } else if (value instanceof Double) { |
813 | | - return greater((Double) value); |
814 | | - } else if (value instanceof Float) { |
815 | | - return greater((Float) value); |
816 | | - } else { |
817 | | - throw new IllegalArgumentException("Only LONG, INTEGER, DOUBLE or FLOAT values are supported."); |
818 | | - } |
819 | | - } |
820 | | - |
821 | | - /** |
822 | | - * Creates an "less than ('<')" condition for this property. |
823 | | - * |
824 | | - * @deprecated Use {@link #less} instead. |
825 | | - */ |
826 | | - @Deprecated |
827 | | - public PropertyQueryCondition<ENTITY> lt(Object value) { |
828 | | - if (value instanceof Long) { |
829 | | - return less((Long) value); |
830 | | - } else if (value instanceof Integer) { |
831 | | - return less((Integer) value); |
832 | | - } else if (value instanceof Double) { |
833 | | - return less((Double) value); |
834 | | - } else if (value instanceof Float) { |
835 | | - return less((Float) value); |
836 | | - } else { |
837 | | - throw new IllegalArgumentException("Only LONG, INTEGER, DOUBLE or FLOAT values are supported."); |
838 | | - } |
839 | | - } |
840 | | - |
841 | | - /** |
842 | | - * Creates an "IS NOT NULL" condition for this property. |
843 | | - * |
844 | | - * @deprecated Use {@link #notNull()} instead. |
845 | | - */ |
846 | | - @Deprecated |
847 | | - public PropertyQueryCondition<ENTITY> isNotNull() { |
848 | | - return notNull(); |
849 | | - } |
850 | | - |
851 | 723 | @Internal |
852 | 724 | public int getEntityId() { |
853 | 725 | return entity.getEntityId(); |
|
0 commit comments