net.liftweb.mapper.OneToMany.MappedOneToManyBase

class MappedOneToManyBase

class MappedOneToManyBase[O <: Mapper[Any]](val reloadFunc : () => Seq[O], val foreign : (O) => MappedForeignKey[K, Any, T])

 extends Buffer[O]


This is the base class to use for fields that represent one-to-many or parent-child relationships. Maintains a list of children, tracking pending additions and deletions, and keeping their foreign key pointed to this mapper. Implements Buffer, so the children can be managed as one. Most users will use MappedOneToMany, however to support children from multiple tables it is necessary to use MappedOneToManyBase.
param
foreign - A function that gets the MappedForeignKey on the child that refers to this parent
reloadFunc - A function that returns a sequence of children from storage.


Source: OneToMany.scala(85)

Direct Known Subclasses

Owned, MappedOneToMany, Cascade,

 Constructors

def this(reloadFunc : () => Seq[O], foreign : (O) => MappedForeignKey[K, Any, T])

 Fields

all.. def all
Returns the backing List
List[O]
delegate.. protected def delegate List[O]
elements.. def elements Iterator[O]
first.. def first A Seq
firstOption.. def firstOption Option[A] Seq
hasDefiniteSize.. def hasDefiniteSize Boolean Iterable
headOption.. def headOption Option[A] Seq
isEmpty.. override def isEmpty Boolean Seq
last.. def last A Seq
lastOption.. def lastOption Option[A] Seq
length.. def length Int
mkString.. def mkString String Iterable
projection.. override def projection Projection[A] Seq
readOnly.. def readOnly List[O]
reverse.. def reverse Seq[A] Seq
save.. def save
Saves this "field," i [details]
e., all the children it represents. Returns false as soon as save on a child returns false. Returns true if all children were saved successfully.
Boolean
size.. def size Int Seq
stringPrefix.. protected override def stringPrefix String Buffer
toList.. def toList List[A] Iterable
toSeq.. override def toSeq Seq[A] Seq
toStream.. def toStream Stream[A] Iterable

 Methods

!=.. final def !=(arg0 : Any) Boolean Any
!=.. final def !=(arg0 : Object) Boolean AnyRef
+.. def +(arg0 : A) Buffer[A] Buffer
++.. def ++(arg0 : Iterator[A]) Buffer[A] Buffer
++.. def ++(arg0 : Iterable[A]) Buffer[A] Buffer
++.. override def ++[B >: A](arg0 : Iterable[B]) Seq[B] Buffer
++:.. def ++:(arg0 : Iterable[A]) Buffer[A] Buffer
++=.. def ++=(arg0 : Iterable[A]) Unit Buffer
++=.. def ++=(arg0 : Iterator[A]) Unit Buffer
++=.. def ++=(arg0 : Array[A], arg1 : Int, arg2 : Int) Unit Buffer
+:.. def +:(elem : O) MappedOneToManyBase[O]
+=.. def +=(elem : O) Unit
-=.. def -=(arg0 : A) Unit Buffer
/:.. def /:[B](arg0 : B) B Iterable
:\.. def :\[B](arg0 : B) B Iterable
<<.. def <<(arg0 : Message[(Location, A)]) Unit Buffer
==.. final def ==(arg0 : Object) Boolean AnyRef
==.. final def ==(arg0 : Any) Boolean Any
addString.. def addString(arg0 : StringBuilder, arg1 : String) StringBuilder Iterable
addString.. def addString(arg0 : StringBuilder, arg1 : String, arg2 : String, arg3 : String) StringBuilder Iterable
addString.. def addString(arg0 : StringBuilder) StringBuilder Iterable
andThen.. override def andThen[C](arg0 : (B) => C) PartialFunction[A, C] PartialFunction
append.. def append(arg0 : A*) Unit Buffer
appendAll.. def appendAll(arg0 : Iterable[A]) Unit Buffer
apply.. def apply(n : Int) O
asInstanceOf.. final def asInstanceOf[T0] T0 Any
clear.. def clear Unit
clone.. override def clone Buffer[A] Buffer
compose.. def compose[A](arg0 : (A) => T1) (A) => R Function1
concat.. override def concat[B >: A](arg0 : Iterable[B]) Seq[B] Seq
contains.. def contains(arg0 : Any) Boolean Seq
containsSlice.. def containsSlice[B](arg0 : Seq[B]) Boolean Seq
copyToArray.. def copyToArray[B >: A](arg0 : Array[B], arg1 : Int) Unit Iterable
copyToBuffer.. def copyToBuffer[B >: A](arg0 : Buffer[B]) Unit Iterable
delegate_=.. protected def delegate_=(d : List[O]) Unit
drop.. override def drop(arg0 : Int) Seq[A] Seq
dropWhile.. override def dropWhile(arg0 : (A) => Boolean) Seq[A] Seq
endsWith.. def endsWith[B](arg0 : Seq[B]) Boolean Seq
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
equalsWith.. def equalsWith[B](arg0 : Seq[B]) Boolean Seq
exists.. def exists(arg0 : (A) => Boolean) Boolean Iterable
filter.. override def filter(arg0 : (A) => Boolean) Seq[A] Seq
finalize.. protected def finalize Unit AnyRef
find.. def find(arg0 : (A) => Boolean) Option[A] Iterable
findIndexOf.. override def findIndexOf(arg0 : (A) => Boolean) Int Seq
flatMap.. override def flatMap[B](arg0 : (A) => Iterable[B]) Seq[B] Seq
foldLeft.. def foldLeft[B](arg0 : B) B Iterable
foldRight.. def foldRight[B](arg0 : B) B Iterable
forall.. def forall(arg0 : (A) => Boolean) Boolean Iterable
foreach.. def foreach(arg0 : (A) => Unit) Unit Iterable
getClass.. final def getClass Class[Any] AnyRef
hashCode.. override def hashCode Int Buffer
indexOf.. def indexOf[B >: A](arg0 : Seq[B]) Int Seq
indexOf.. override def indexOf[B >: O](e : B) Int
insert.. def insert(arg0 : Int, arg1 : A*) Unit Buffer
insertAll.. def insertAll(n : Int, iter : Iterable[O]) Unit
isDefinedAt.. def isDefinedAt(arg0 : Int) Boolean Seq
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
lastIndexOf.. def lastIndexOf[B >: A](arg0 : B) Int Seq
lengthCompare.. def lengthCompare(arg0 : Int) Int Seq
map.. override def map[B](arg0 : (A) => B) Seq[B] Seq
mkString.. def mkString(arg0 : String) String Iterable
mkString.. def mkString(arg0 : String, arg1 : String, arg2 : String) String Iterable
ne.. final def ne(arg0 : Object) Boolean AnyRef
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
orElse.. def orElse[A1 <: A, B1 >: B](arg0 : PartialFunction[A1, B1]) PartialFunction[A1, B1] PartialFunction
own.. protected def own(e : O)
Takes ownership of e [details]
Sets e's foreign key to our primary key
O
partition.. def partition(arg0 : (A) => Boolean) (Iterable[A], Iterable[A]) Iterable
prepend.. def prepend(arg0 : A*) Unit Buffer
prependAll.. def prependAll(arg0 : Iterable[A]) Unit Buffer
reduceLeft.. def reduceLeft[B >: A](arg0 : (B, A) => B) B Iterable
reduceRight.. def reduceRight[B >: A](arg0 : (A, B) => B) B Iterable
refresh.. def refresh
Reloads the children from storage [details]
NOTE: This may leave children in an inconsistent state. It is recommended to call save or clear() before calling refresh.
Unit
remove.. def remove(n : Int) O
sameElements.. def sameElements[B >: A](arg0 : Iterable[B]) Boolean Iterable
slice.. def slice(arg0 : Int) Seq[A] Seq
slice.. def slice(arg0 : Int, arg1 : Int) Seq[A] Seq
startsWith.. def startsWith[B](arg0 : Seq[B]) Boolean Seq
startsWith.. def startsWith[B](arg0 : Seq[B], arg1 : Int) Boolean Seq
subseq.. def subseq(arg0 : Int, arg1 : Int) Seq[A] Seq
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
take.. override def take(arg0 : Int) Seq[A] Seq
takeWhile.. override def takeWhile(arg0 : (A) => Boolean) Seq[A] Seq
toArray.. override def toArray[B >: A] Array[B] Seq
toString.. override def toString String
trimEnd.. def trimEnd(arg0 : Int) Unit Buffer
trimStart.. def trimStart(arg0 : Int) Unit Buffer
unown.. protected def unown(e : O)
Relinquishes ownership of e [details]
Resets e's foreign key to its default value.
O
update.. def update(n : Int, newelem : O) Unit
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.