AbstractBasePersistence() { if (this instanceof Collection<?> || this instanceof Map<?, ?>) { throw new IllegalProgramException( "BasePersistence can not be collection"); } }
protected AbstractElementEventDispatcher<E> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractWrapperXCollection.class) ); }
protected AbstractElementEventDispatcher<Entry<K, V>> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), EntrySetImpl.class) ); }
private static void validateEqualsMethod(Method method) { if ( !Modifier.isPublic(method.getModifiers()) || Modifier.isStatic(method.getModifiers()) || !"equals".equals(method.getName()) || boolean.class != method.getReturnType() || !Arrays.equals(method.getParameterTypes(), ONE_OBJECT_TYPE_ARRAY)) { throw new IllegalProgramException( invalidOverrideEqualityMethod(method, OverrideEquality.class) ); } }
protected AbstractKeySetElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractIteratorImpl.class) ); }
protected AbstractValuesElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), IteratorImpl.class) ); }
protected final String getResultInternalName() { String resultInternalName = this.resultInternalName; if (resultInternalName == null) { throw new IllegalProgramException(accessFieldTooEarly(this.getClass(), "resultInternalName")); } return resultInternalName; }
protected AbstractElementEventDispatcher<E> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractIteratorImpl.class) ); }
protected AbstractMapElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractWrapperXMap.class) ); }
protected AbstractElementEventDispatcher<Entry<K, V>> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), IteratorImpl.class) ); }
protected AbstractKeySetElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractKeySetImpl.class) ); }
protected AbstractValuesElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), ValuesImpl.class) ); }
protected AbstractEntryElementEventDispatcher<K, V> createEventDispatcher() { throw new IllegalProgramException( CommonMessages.mustOverrideCreateEventDispatcher( this.getClass(), AbstractEntryImpl.class) ); }
private static <X, Y> Path<X> safeGetSelf(SelfGetter<X, Y> selfGetter, XRoot<Y> target) { Path<X> self = selfGetter.getSelf(target); if (self == null) { throw new IllegalProgramException( selfGetterCanNotReturnNull( selfGetter.getClass(), "Path<S> getSelf(XRoot<T> target)" ) ); } return self; }
private AbstractElementEventDispatcher<E> eventDispatcher() { AbstractElementEventDispatcher<E> dispatcher = this.createEventDispatcher(); if (dispatcher == null) { throw new IllegalProgramException(CommonMessages.createEventDispatcherMustReturnNonNull(this.getClass())); } if (dispatcher.getOwner() != this) { throw new IllegalProgramException(CommonMessages.ownerOfReturnedValueOfCreateEventDispatcherMustBeThis(this.getClass())); } return dispatcher; } }
protected final PersistentCollection<E> getWrapperPersistentCollection() { PersistentCollection<E> wrapper = this.onGetWrapperPersistentCollection(); if (wrapper == null) { throw new IllegalProgramException( methodCanNotReturnNull( "onGetWrapperPersistentCollection", this.getClass() ) ); } if (wrapper == this) { throw new IllegalProgramException( methodCanNotReturnThis( "onGetWrapperPersistentCollection", this.getClass() ) ); } return wrapper; }
private AbstractElementEventDispatcher<Entry<K, V>> eventDispatcher() { AbstractElementEventDispatcher<Entry<K, V>> dispatcher = this.createEventDispatcher(); if (dispatcher == null) { throw new IllegalProgramException( CommonMessages.createEventDispatcherMustReturnNonNull(this.getClass()) ); } if (dispatcher.getOwner() != this) { throw new IllegalProgramException( CommonMessages.ownerOfReturnedValueOfCreateEventDispatcherMustBeThis(this.getClass()) ); } return dispatcher; }
private AbstractMapElementEventDispatcher<K, V> eventDispatcher() { AbstractMapElementEventDispatcher<K, V> dispatcher = this.createEventDispatcher(); if (dispatcher == null) { throw new IllegalProgramException( CommonMessages.createEventDispatcherMustReturnNonNull(this.getClass()) ); } if (dispatcher.getOwner() != this) { throw new IllegalProgramException( CommonMessages.ownerOfReturnedValueOfCreateEventDispatcherMustBeThis(this.getClass()) ); } return dispatcher; }
private AbstractKeySetElementEventDispatcher<K, V> eventDispatcher() { AbstractKeySetElementEventDispatcher<K, V> dispatcher = this.createEventDispatcher(); if (dispatcher == null) { throw new IllegalProgramException( CommonMessages.createEventDispatcherMustReturnNonNull(this.getClass()) ); } if (dispatcher.getOwner() != this) { throw new IllegalProgramException( CommonMessages.ownerOfReturnedValueOfCreateEventDispatcherMustBeThis(this.getClass()) ); } return dispatcher; }
private AbstractElementEventDispatcher<E> eventDispatcher() { AbstractElementEventDispatcher<E> dispatcher = this.createEventDispatcher(); if (dispatcher == null) { throw new IllegalProgramException( CommonMessages.createEventDispatcherMustReturnNonNull(this.getClass()) ); } if (dispatcher.getOwner() != this) { throw new IllegalProgramException( CommonMessages.ownerOfReturnedValueOfCreateEventDispatcherMustBeThis(this.getClass())); } return dispatcher; }