Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 2340 | Rev 5671 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2340 Rev 2350
Línea 81... Línea 81...
81
        ->unnest();    
81
        ->unnest();    
Línea 82... Línea 82...
82
        
82
        
83
        return $this->executeFetchOneObject($select, $prototype);
83
        return $this->executeFetchOneObject($select, $prototype);
Línea 84... Línea -...
84
    }
-
 
85
 
-
 
86
    public function fetchOneByCompanyIdAndUserId($company_id, $user_id)
-
 
87
    {
-
 
88
        $prototype = new Conversation();
-
 
89
        $select = $this->sql->select(self::_TABLE);
-
 
90
        $select->where->and->nest()
-
 
91
        ->nest()
-
 
92
        ->equalTo('sender_company_id', $company_id)
-
 
93
        ->and->equalTo('receiver_id', $user_id)
-
 
94
        ->unnest()
-
 
95
        ->or->nest()
-
 
96
        ->equalTo('receiver_company_id', $company_id)
-
 
97
        ->and->equalTo('sender_id', $user_id)
-
 
98
        ->unnest()
-
 
99
        ->unnest();    
-
 
100
        
-
 
Línea 101... Línea 84...
101
        return $this->executeFetchOneObject($select, $prototype);
84
    }
102
    }
85
 
103
 
86
 
Línea 124... Línea 107...
124
        ->unnest();
107
        ->unnest();
Línea 125... Línea 108...
125
        
108
        
126
        return $this->executeFetchAllObject($select, $prototype);
109
        return $this->executeFetchAllObject($select, $prototype);
Línea 127... Línea -...
127
    }
-
 
128
 
-
 
129
    public function fetchAllByCompanyId($company_id)
-
 
130
    {
110
    }
131
        $prototype = new Conversation();
-
 
132
        
-
 
133
        $select = $this->sql->select(self::_TABLE);
-
 
134
        $select->where->and->nest()
-
 
135
        ->nest()
-
 
136
        ->equalTo('sender_company_id', $company_id)
-
 
137
        ->and->equalTo('sender_status', Conversation::STATUS_NORMAL)
-
 
138
        ->unnest()
-
 
139
        ->or->nest()
-
 
140
        ->equalTo('receiver_company_id', $company_id)
-
 
141
        ->and->equalTo('receiver_status', Conversation::STATUS_NORMAL)
-
 
142
        ->unnest()
-
 
143
        ->unnest();
-
 
144
        
-
 
145
        return $this->executeFetchAllObject($select, $prototype);
-
 
Línea 146... Línea 111...
146
    }
111
 
147
    
112
 
148
    
113
    
149
    /**
114
    /**